We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f336572 commit b102b53Copy full SHA for b102b53
lib/secure_headers/headers/content_security_policy.rb
@@ -139,7 +139,10 @@ def initialize(config=nil, options={})
139
@config = config.inject({}) do |hash, (key, value)|
140
config_val = value.respond_to?(:call) ? value.call(@controller) : value
141
if ALL_DIRECTIVES.include?(key.to_sym) # directives need to be normalized to arrays of strings
142
- config_val = config_val.split if config_val.is_a? String
+ if config_val.is_a? String
143
+ warn "[DEPRECATION] A String was supplied for directive #{key}. secure_headers 3.x will require all directives to be arrays of strings."
144
+ config_val = config_val.split
145
+ end
146
if config_val.is_a?(Array)
147
config_val = config_val.map do |val|
148
translate_dir_value(val)
0 commit comments