Skip to content

Commit

Permalink
oops, move deprecation warning out of test and into code
Browse files Browse the repository at this point in the history
  • Loading branch information
oreoshake committed Jan 6, 2016
1 parent 7915516 commit 6cef8c7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ def other_action
end

def secure_header_options_for(header, options)
warn "[DEPRECATION] secure_header_options_for will not be supported in secure_headers 3.x."
if params[:action] == "other_action"
if header == :csp
options.merge(:style_src => "'self'")
Expand Down
1 change: 1 addition & 0 deletions lib/secure_headers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ def set_x_permitted_cross_domain_policies_header(options=self.class.secure_heade
# we can't use ||= because I'm overloading false => disable, nil => default
# both of which trigger the conditional assignment
def secure_header_options_for(type, options)
warn "[DEPRECATION] secure_header_options_for will not be supported in secure_headers 3.x."
options.nil? ? ::SecureHeaders::Configuration.send(type) : options
end

Expand Down

0 comments on commit 6cef8c7

Please sign in to comment.