sandbox(*values)
public
Specify whether a sandbox should be enabled for the requested resource:
policy.sandbox
Values can be passed as arguments:
policy.sandbox "allow-scripts", "allow-modals"
Pass false to disable the sandbox:
policy.sandbox false
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 265
def sandbox(*values)
if values.empty?
@directives["sandbox"] = true
elsif values.first
@directives["sandbox"] = values
else
@directives.delete("sandbox")
end
end