Skip to content

Commit

Permalink
Merge pull request #67 from blat/2.16.x
Browse files Browse the repository at this point in the history
Allows require-trusted-types-for CSP directive
  • Loading branch information
Ocramius committed Aug 17, 2022
1 parent 261f079 commit e36d423
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
"forum": "https://discourse.laminas.dev"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
},
"sort-packages": true
},
"require": {
Expand Down
1 change: 1 addition & 0 deletions src/Header/ContentSecurityPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class ContentSecurityPolicy implements MultipleHeaderInterface
// Other directives
'block-all-mixed-content',
'require-sri-for',
'require-trusted-types-for',
'trusted-types',
'upgrade-insecure-requests',
];
Expand Down
1 change: 1 addition & 0 deletions test/Header/ContentSecurityPolicyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ public static function validDirectives(): array
// Other directives
['block-all-mixed-content', [], 'Content-Security-Policy: block-all-mixed-content;'],
['require-sri-for', ['script', 'style'], 'Content-Security-Policy: require-sri-for script style;'],
['require-trusted-types-for', ['script'], 'Content-Security-Policy: require-trusted-types-for script;'],
['trusted-types', ['*'], 'Content-Security-Policy: trusted-types *;'],
['upgrade-insecure-requests', [], 'Content-Security-Policy: upgrade-insecure-requests;'],
];
Expand Down

0 comments on commit e36d423

Please sign in to comment.