Skip to content

Commit 8df5b97

Browse files
committed
doc updates
1 parent d4454c9 commit 8df5b97

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,20 @@ This gem makes a few assumptions about how you will use some features. For exam
5757
:max_age => 60.days.to_i,
5858
:include_subdomains => true,
5959
:report_uri => '//example.com/uri-directive',
60-
:pins => [{:sha256 => 'b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c'}]
60+
:pins => [
61+
{:sha256 => 'abc'},
62+
{:sha256 => '123'}
63+
]
6164
}
6265
end
6366

64-
# and then simply include this in application_controller.rb
67+
# and then include this in application_controller.rb
6568
class ApplicationController < ActionController::Base
6669
ensure_security_headers
6770
end
6871
```
6972

70-
Or simply add it to application controller
73+
Or do the config as a parameter to `ensure_security_headers`
7174

7275
```ruby
7376
ensure_security_headers(
@@ -308,6 +311,8 @@ console.log("will raise an exception if not in script_hashes.yml!")
308311

309312
### Public Key Pins
310313

314+
Be aware that pinning error reporting is governed by the same rules as everything else. If you have a pinning failure that tries to report back to the same origin, by definition this will not work.
315+
311316
```
312317
config.hpkp = {
313318
max_age: 60.days.to_i, # max_age is a required parameter

0 commit comments

Comments
 (0)