diff --git a/app/controllers/widgets_controller.rb b/app/controllers/widgets_controller.rb
index 7f45ce636..913319303 100644
--- a/app/controllers/widgets_controller.rb
+++ b/app/controllers/widgets_controller.rb
@@ -77,13 +77,23 @@ class WidgetsController < ActionController::Base
end
def allow_iframe_requests
- if @web_widget.allowed_domains.blank?
+ if @web_widget.allowed_domains.blank? || embedded_from_non_web_origin?
response.headers.delete('X-Frame-Options')
else
domains = @web_widget.allowed_domains.split(',').map(&:strip).join(' ')
response.headers['Content-Security-Policy'] = "frame-ancestors #{domains}"
end
end
+
+ # Mobile WebViews (iOS/Android) load content from file:// or null origins,
+ # which cannot match any domain in frame-ancestors. When the per-inbox flag
+ # is enabled, skip frame-ancestors for these requests.
+ def embedded_from_non_web_origin?
+ return false unless @web_widget.allow_mobile_webview?
+
+ origin = request.headers['Origin']
+ origin.blank? || origin == 'null' || origin&.start_with?('file://')
+ end
end
WidgetsController.prepend_mod_with('WidgetsController')
diff --git a/app/javascript/dashboard/components-next/Settings/SettingsToggleSection.vue b/app/javascript/dashboard/components-next/Settings/SettingsToggleSection.vue
index 62e8b44fa..ab3f8488e 100644
--- a/app/javascript/dashboard/components-next/Settings/SettingsToggleSection.vue
+++ b/app/javascript/dashboard/components-next/Settings/SettingsToggleSection.vue
@@ -14,6 +14,10 @@ defineProps({
type: Boolean,
default: false,
},
+ hideToggle: {
+ type: Boolean,
+ default: false,
+ },
});
const modelValue = defineModel({ type: Boolean, default: false });
@@ -28,7 +32,8 @@ const modelValue = defineModel({ type: Boolean, default: false });
{{ header }}
-
- {{ $t('INBOX_MGMT.SETTINGS_POPUP.HMAC_DESCRIPTION') }} - - {{ $t('INBOX_MGMT.SETTINGS_POPUP.HMAC_LINK_TO_DOCS') }} - -
-+ {{ $t('INBOX_MGMT.SETTINGS_POPUP.IDENTITY_VALIDATION.SECRET_KEY') }} +
++ {{ $t('INBOX_MGMT.SETTINGS_POPUP.HMAC_DESCRIPTION') }} + + {{ + $t('INBOX_MGMT.SETTINGS_POPUP.IDENTITY_VALIDATION.VIEW_DOCS') + }} + +
+ +