Skip to content

Commit

Permalink
Merge pull request #2153 from manyfold3d/content-ecurity-policy
Browse files Browse the repository at this point in the history
Allow Manyfold to be in a same origin frame
  • Loading branch information
Floppy committed May 8, 2024
2 parents 280ab28 + 6a2a6f3 commit 41af5b1
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions config/initializers/content_security_policy.rb
Original file line number Diff line number Diff line change
@@ -1,25 +1,9 @@
# Be sure to restart your server when you modify this file.

# Define an application-wide content security policy.
# See the Securing Rails Applications Guide for more information:
# https://guides.rubyonrails.org/security.html#content-security-policy-header

# Rails.application.configure do
# config.content_security_policy do |policy|
# policy.default_src :self, :https
# policy.font_src :self, :https, :data
# policy.img_src :self, :https, :data
# policy.object_src :none
# policy.script_src :self, :https
# policy.style_src :self, :https
# # Specify URI for violation reports
# # policy.report_uri "/csp-violation-report-endpoint"
# end
#
# # Generate session nonces for permitted importmap and inline scripts
# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
# config.content_security_policy_nonce_directives = %w(script-src)
#
# # Report violations without enforcing the policy.
# # config.content_security_policy_report_only = true
# end
Rails.application.configure do
config.content_security_policy do |policy|
policy.frame_ancestors :self
end
end

0 comments on commit 41af5b1

Please sign in to comment.