instance method
apply_mappings
Ruby on Rails 8.1.2
Since v5.2.8.1 PrivateSignature
apply_mappings(sources)
No documentation comment.
Parameters
-
sourcesreq
Source
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 305
def apply_mappings(sources)
sources.map do |source|
case source
when Symbol
apply_mapping(source)
when String
if hash_source?(source)
"'#{source}'"
else
source
end
when Proc
source
else
raise ArgumentError, "Invalid content security policy source: #{source.inspect}"
end
end
end
Defined in actionpack/lib/action_dispatch/http/content_security_policy.rb line 305
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::ContentSecurityPolicy