Skip to content

Commit d6dc261

Browse files
committed
report_only replaces enforce in 3.x
1 parent c215640 commit d6dc261

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

upgrading-to-3-0.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ Changes
1111
| `self`/`none` source expressions | could be `self` / `none` / `'self'` / `'none'` | Must be `'self'` or `'none'` |
1212
| `inline` / `eval` source expressions | could be `inline`, `eval`, `'unsafe-inline'`, or `'unsafe-eval'` | Must be `'unsafe-eval'` or `'unsafe-inline'` |
1313
| Per-action configuration | override [`def secure_header_options_for(header, options)`](https://github.com/twitter/secureheaders/commit/bb9ebc6c12a677aad29af8e0f08ffd1def56efec#diff-04c6e90faac2675aa89e2176d2eec7d8R111) | Use [named overrides](https://github.com/twitter/secureheaders#named-overrides) or [per-action helpers](https://github.com/twitter/secureheaders#per-action-configuration) |
14+
| CSP/HPKP use `report_only` config that defaults to false | `enforce: false` | `report_only: false` |
1415

1516
Migrating to 3.x from <= 2.x
1617
==
1718

1819
1. Convert all headers except for CSP/HPKP using hashes to string values. The values are validated at runtime and will provide guidance on misconfigured headers.
1920
1. Convert all instances of `self`/`none`/`eval`/`inline` to the corresponding values in the above table.
2021
1. Convert all CSP space-delimited directives to an array of strings.
22+
1. Convert all `enforce: true|false` to `report_only: true|false`.
2123

2224
Everything is terrible, why should I upgrade?
2325
==

0 commit comments

Comments
 (0)