Skip to content

Commit

Permalink
Change default TT policy name
Browse files Browse the repository at this point in the history
  • Loading branch information
Siegrift committed May 1, 2022
1 parent 68d3974 commit 8ef1a48
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions examples/client/trusted-types-overlay/README.md
Expand Up @@ -11,7 +11,7 @@ module.exports = {
devServer: {
client: {
overlay: {
trustedTypesPolicyName: "overlay-policy",
trustedTypesPolicyName: "webpack#dev-overlay",
},
},
},
Expand All @@ -32,5 +32,5 @@ npx webpack serve --open
4. Restart the command and you should not see an overlay at all. In the console you should see the following error:

```
Refused to create a TrustedTypePolicy named 'disallowed-policy' because it violates the following Content Security Policy directive: "trusted-types webpack overlay-policy".
Refused to create a TrustedTypePolicy named 'disallowed-policy' because it violates the following Content Security Policy directive: "trusted-types webpack webpack#dev-overlay".
```
2 changes: 1 addition & 1 deletion examples/client/trusted-types-overlay/layout.html
Expand Up @@ -5,7 +5,7 @@
<!-- Enable Trusted Types -->
<meta
http-equiv="Content-Security-Policy"
content="require-trusted-types-for 'script'; trusted-types webpack overlay-policy;"
content="require-trusted-types-for 'script'; trusted-types webpack webpack#dev-overlay;"
/>

<title>WDS ▻ <%= htmlWebpackPlugin.options.title %></title>
Expand Down
2 changes: 1 addition & 1 deletion examples/client/trusted-types-overlay/webpack.config.js
Expand Up @@ -16,7 +16,7 @@ const config = setup({
devServer: {
client: {
overlay: {
trustedTypesPolicyName: "overlay-policy",
trustedTypesPolicyName: "webpack#dev-overlay",
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/overlay.test.js
Expand Up @@ -782,7 +782,7 @@ describe("overlay", () => {
port,
client: {
overlay: {
trustedTypesPolicyName: "overlay-policy",
trustedTypesPolicyName: "webpack#dev-overlay",
},
},
};
Expand Down
4 changes: 2 additions & 2 deletions test/helpers/trusted-types-html-generator-plugin.js
Expand Up @@ -6,7 +6,7 @@ const HTMLContentForIndex = `
<head>
<meta
http-equiv="Content-Security-Policy"
content="require-trusted-types-for 'script'; trusted-types webpack overlay-policy;"
content="require-trusted-types-for 'script'; trusted-types webpack webpack#dev-overlay;"
/>
<meta charset='UTF-8'>
<title>webpack-dev-server</title>
Expand All @@ -24,7 +24,7 @@ const HTMLContentForTest = `
<head>
<meta
http-equiv="Content-Security-Policy"
content="require-trusted-types-for 'script'; trusted-types webpack overlay-policy;"
content="require-trusted-types-for 'script'; trusted-types webpack webpack#dev-overlay;"
/>
<meta charset='UTF-8'>
<title>test</title>
Expand Down

0 comments on commit 8ef1a48

Please sign in to comment.