File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed
Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change 22
33module SecureHeaders
44 describe SecureHeaders do
5- example_hpkp_config = {
6- max_age : 1_000_000 ,
7- include_subdomains : true ,
8- report_uri : '//example.com/uri-directive' ,
9- pins : [
10- { sha256 : 'abc' } ,
11- { sha256 : '123' }
12- ]
13- }
14-
15- example_hpkp_config_value = %(max-age=1000000; pin-sha256="abc"; pin-sha256="123"; report-uri="//example.com/uri-directive"; includeSubDomains)
16-
175 before ( :each ) do
186 reset_config
197 end
@@ -90,7 +78,15 @@ module SecureHeaders
9078 it "does not set the HPKP header if request is over HTTP" do
9179 plaintext_request = Rack ::Request . new ( { } )
9280 Configuration . default do |config |
93- config . hpkp = example_hpkp_config
81+ config . hpkp = {
82+ max_age : 1_000_000 ,
83+ include_subdomains : true ,
84+ report_uri : '//example.com/uri-directive' ,
85+ pins : [
86+ { sha256 : 'abc' } ,
87+ { sha256 : '123' }
88+ ]
89+ }
9490 end
9591
9692 expect ( SecureHeaders . header_hash_for ( plaintext_request ) [ PublicKeyPins ::HEADER_NAME ] ) . to be_nil
You can’t perform that action at this time.
0 commit comments