mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-03 06:59:14 +00:00
Remove X-Frame-Options header
This header is largely deprecated, and is functionally replaced here by use of the frame-ancestors CSP configuration
This commit is contained in:
@@ -37,7 +37,6 @@ class ApplicationController < ActionController::Base
|
||||
include Spree::Core::ControllerHelpers::RespondWith
|
||||
include Spree::Core::ControllerHelpers::Common
|
||||
|
||||
prepend_before_action :restrict_iframes
|
||||
before_action :set_cache_headers # prevent cart emptying via cache when using back button #1213
|
||||
|
||||
include RawParams
|
||||
@@ -107,11 +106,6 @@ class ApplicationController < ActionController::Base
|
||||
session[:shopfront_redirect]
|
||||
end
|
||||
|
||||
def restrict_iframes
|
||||
response.headers['X-Frame-Options'] = 'DENY'
|
||||
response.headers['Content-Security-Policy'] = "frame-ancestors 'none'"
|
||||
end
|
||||
|
||||
def enable_embedded_shopfront
|
||||
embed_service = EmbeddedPageService.new(params, session, request, response)
|
||||
embed_service.embed!
|
||||
|
||||
Reference in New Issue
Block a user