Skip to content

Commit bba215a

Browse files
author
Neil Matatall
committed
docs and version bump
1 parent 651ee71 commit bba215a

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

HISTORY.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
1.3.2
2+
======
3+
4+
Adds the ability to "tag" requests and a new config value: :app_name
5+
6+
{
7+
:tag_report_uri => true,
8+
:enforce => true,
9+
:app_name => 'twitter',
10+
:report_uri => 'csp_reports'
11+
}
12+
13+
Results in
14+
report-uri csp_reports?enforce=true&app_name=twitter
15+
16+
117
1.3.1
218
======
319

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,24 @@ and [Mozilla CSP specification](https://wiki.mozilla.org/Security/CSP/Specificat
197197
"default-src 'self'; img-src *; object-src media1.com media2.com *.cdn.com; script-src trustedscripts.example.com;"
198198
```
199199

200+
### Tagging Reuqests
201+
202+
It's often valuable to send extra information in the report uri that is not available in the reports themselves. Namely, "was the policy enforced" and "where did the report come from"
203+
204+
```ruby
205+
{
206+
:tag_report_uri => true,
207+
:enforce => true,
208+
:app_name => 'twitter',
209+
:report_uri => 'csp_reports'
210+
}
211+
```
212+
213+
Results in
214+
```
215+
report-uri csp_reports?enforce=true&app_name=twitter
216+
```
217+
200218
### CSP Level 2 features
201219

202220
script/style-nonce can be used to whitelist inline content. To do this, add "nonce" to your script/style-src configuration, then set the nonce attributes on the various tags.

lib/secure_headers/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module SecureHeaders
2-
VERSION = "1.3.1"
2+
VERSION = "1.3.2"
33
end

0 commit comments

Comments
 (0)