mirror of
https://github.com/manyfold3d/manyfold.git
synced 2026-10-22 03:32:18 -05:00
13 lines
557 B
Ruby
13 lines
557 B
Ruby
# 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
|
|
|
|
# Configured dynamically in ApplicationController#configure_content_security_policy
|
|
|
|
Rails.application.configure do
|
|
# Disable CSP nonce if we're pulling in Scout DevTrace
|
|
unless Rails.env.development? && ENV.fetch("SCOUT_DEV_TRACE", false) === "true"
|
|
config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
|
|
end
|
|
end
|