You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an application that uses Padrino and in it we are having a problem because there is a page that needs to be opened in an iframe in another application. At first the page is blocked because x-frame-options is set to sameorigin.
As I researched more details on, I found that the best solution would be to use Content Security Policy, which is supported by most browsers.
However, I can not get the Padrino to use it. I saw that the padrino uses Sinatra and Rack::Protection to set up the header, but I cannot get my application to put the Content-Security-Policy header on response.
I was able to disable x-frame-options to avoid conflicts, but I can not enable csp.
Here are my config\apps.rb
# config/apps.rbPadrino.configure_appsdo# enable :sessionsset:session_secret,'<some secret>'set:protection,{:use=>[:content_security_policy],:except=>[:path_traversal,:frame_options],:frame_ancestors=>"self <domain that will open my page>"}set:protect_from_csrf,trueend
I have an application that uses Padrino and in it we are having a problem because there is a page that needs to be opened in an iframe in another application. At first the page is blocked because x-frame-options is set to sameorigin.
As I researched more details on, I found that the best solution would be to use Content Security Policy, which is supported by most browsers.
However, I can not get the Padrino to use it. I saw that the padrino uses Sinatra and Rack::Protection to set up the header, but I cannot get my application to put the Content-Security-Policy header on response.
I was able to disable x-frame-options to avoid conflicts, but I can not enable csp.
Here are my
config\apps.rb
Response Header:
The text was updated successfully, but these errors were encountered: