fix: Allow Iframes requests on portal controller (#7858)

This commit is contained in:
Nithin David Thomas
2023-09-06 14:25:03 +05:30
committed by GitHub
parent 99bb074656
commit a8009c7b39
2 changed files with 7 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
class Public::Api::V1::Portals::BaseController < PublicController
before_action :show_plain_layout
around_action :set_locale
after_action :allow_iframe_requests
private
@@ -39,4 +40,8 @@ class Public::Api::V1::Portals::BaseController < PublicController
I18n.with_locale(@locale, &)
end
def allow_iframe_requests
response.headers.delete('X-Frame-Options') if @is_plain_layout_enabled
end
end