File tree Expand file tree Collapse file tree 8 files changed +10
-0
lines changed
Expand file tree Collapse file tree 8 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ def value
4141
4242 def validate_config
4343 if @config . is_a? Hash
44+ warn "[DEPRECATION] secure_headers 3.0 will only accept string values for StrictTransportSecurity config"
4445 if !@config [ :max_age ]
4546 raise STSBuildError . new ( "No max-age was supplied." )
4647 elsif @config [ :max_age ] . to_s !~ /\A \d +\z /
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ def value
2525 when String
2626 @config
2727 else
28+ warn "[DEPRECATION] secure_headers 3.0 will only accept string values for XContentTypeOptions config"
2829 @config [ :value ]
2930 end
3031 end
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ def value
2424 when String
2525 @config
2626 else
27+ warn "[DEPRECATION] secure_headers 3.0 will only accept string values for XDownloadOptions config"
2728 @config [ :value ]
2829 end
2930 end
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ def value
2525 when String
2626 @config
2727 else
28+ warn "[DEPRECATION] secure_headers 3.0 will only accept string values for XFrameOptions config"
2829 @config [ :value ]
2930 end
3031 end
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ def value
2525 when String
2626 @config
2727 else
28+ warn "[DEPRECATION] secure_headers 3.0 will only accept string values for XPermittedCrossDomainPolicies config"
2829 @config [ :value ]
2930 end
3031 end
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ def value
2525 when String
2626 @config
2727 else
28+ warn "[DEPRECATION] secure_headers 3.0 will only accept string values for XXssProtection config"
2829 value = @config [ :value ] . to_s
2930 value += "; mode=#{ @config [ :mode ] } " if @config [ :mode ]
3031 value += "; report=#{ @config [ :report_uri ] } " if @config [ :report_uri ]
Original file line number Diff line number Diff line change 1+ require 'spec_helper'
2+
13module SecureHeaders
24 describe XContentTypeOptions do
35 specify { expect ( XContentTypeOptions . new . name ) . to eq ( "X-Content-Type-Options" ) }
Original file line number Diff line number Diff line change 1+ require 'spec_helper'
2+
13module SecureHeaders
24 describe XXssProtection do
35 specify { expect ( XXssProtection . new . name ) . to eq ( X_XSS_PROTECTION_HEADER_NAME ) }
You can’t perform that action at this time.
0 commit comments