We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e46b315 commit f46a160Copy full SHA for f46a160
1 file changed
lib/secure_headers/headers/content_security_policy.rb
@@ -137,7 +137,13 @@ def initialize(config=nil, options={})
137
138
# Config values can be string, array, or lamdba values
139
@config = config.inject({}) do |hash, (key, value)|
140
- config_val = value.respond_to?(:call) ? value.call(@controller) : value
+ config_val = if value.respond_to?(:call)
141
+ warn "[DEPRECATION] secure_headers 3.x will not support procs as config values."
142
+ value.call(@controller)
143
+ else
144
+ value
145
+ end
146
+
147
if ALL_DIRECTIVES.include?(key.to_sym) # directives need to be normalized to arrays of strings
148
if config_val.is_a? String
149
warn "[DEPRECATION] A String was supplied for directive #{key}. secure_headers 3.x will require all directives to be arrays of strings."
0 commit comments