Commit 5c3f928
committed
Handle the case where the hash is frozen and we're adding a directive
Previously, this would cause an exception:
RuntimeError:
can't modify frozen Hash
./lib/secure_headers/headers/content_security_policy.rb:216:in `block in combine_policies'
./lib/secure_headers/headers/content_security_policy.rb:214:in `each'
./lib/secure_headers/headers/content_security_policy.rb:214:in `combine_policies'
./spec/lib/secure_headers/headers/content_security_policy_spec.rb:127:in `block (3 levels) in <module:SecureHeaders>'1 parent 180d6fa commit 5c3f928
File tree
2 files changed
+13
-0
lines changed- lib/secure_headers/headers
- spec/lib/secure_headers/headers
2 files changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
213 | 215 | | |
214 | 216 | | |
215 | 217 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
120 | 131 | | |
121 | 132 | | |
122 | 133 | | |
| |||
0 commit comments