instance method
block_all_mixed_content
Ruby on Rails 8.0.4
Since v5.2.8.1Signature
block_all_mixed_content(enabled = true)
Specify whether to prevent the user agent from loading any assets over HTTP when the page uses HTTPS:
policy.block_all_mixed_content
Pass false to allow it again:
policy.block_all_mixed_content false
Parameters
-
enabledopt = true
Source
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 210
def block_all_mixed_content(enabled = true)
if enabled
@directives["block-all-mixed-content"] = true
else
@directives.delete("block-all-mixed-content")
end
end
Defined in actionpack/lib/action_dispatch/http/content_security_policy.rb line 210
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::ContentSecurityPolicy