File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,13 @@ def initialize(config=nil, options={})
137137
138138 # Config values can be string, array, or lamdba values
139139 @config = config . inject ( { } ) do |hash , ( key , value ) |
140- config_val = value . respond_to? ( :call ) ? value . call ( @controller ) : value
140+ 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+
141147 if ALL_DIRECTIVES . include? ( key . to_sym ) # directives need to be normalized to arrays of strings
142148 if config_val . is_a? String
143149 warn "[DEPRECATION] A String was supplied for directive #{ key } . secure_headers 3.x will require all directives to be arrays of strings."
You can’t perform that action at this time.
0 commit comments