Skip to content

Commit 8ef1a48

Browse files
committed
Change default TT policy name
1 parent 68d3974 commit 8ef1a48

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

examples/client/trusted-types-overlay/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = {
1111
devServer: {
1212
client: {
1313
overlay: {
14-
trustedTypesPolicyName: "overlay-policy",
14+
trustedTypesPolicyName: "webpack#dev-overlay",
1515
},
1616
},
1717
},
@@ -32,5 +32,5 @@ npx webpack serve --open
3232
4. Restart the command and you should not see an overlay at all. In the console you should see the following error:
3333

3434
```
35-
Refused to create a TrustedTypePolicy named 'disallowed-policy' because it violates the following Content Security Policy directive: "trusted-types webpack overlay-policy".
35+
Refused to create a TrustedTypePolicy named 'disallowed-policy' because it violates the following Content Security Policy directive: "trusted-types webpack webpack#dev-overlay".
3636
```

examples/client/trusted-types-overlay/layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<!-- Enable Trusted Types -->
66
<meta
77
http-equiv="Content-Security-Policy"
8-
content="require-trusted-types-for 'script'; trusted-types webpack overlay-policy;"
8+
content="require-trusted-types-for 'script'; trusted-types webpack webpack#dev-overlay;"
99
/>
1010

1111
<title>WDS ▻ <%= htmlWebpackPlugin.options.title %></title>

examples/client/trusted-types-overlay/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const config = setup({
1616
devServer: {
1717
client: {
1818
overlay: {
19-
trustedTypesPolicyName: "overlay-policy",
19+
trustedTypesPolicyName: "webpack#dev-overlay",
2020
},
2121
},
2222
},

test/e2e/overlay.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ describe("overlay", () => {
782782
port,
783783
client: {
784784
overlay: {
785-
trustedTypesPolicyName: "overlay-policy",
785+
trustedTypesPolicyName: "webpack#dev-overlay",
786786
},
787787
},
788788
};

test/helpers/trusted-types-html-generator-plugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const HTMLContentForIndex = `
66
<head>
77
<meta
88
http-equiv="Content-Security-Policy"
9-
content="require-trusted-types-for 'script'; trusted-types webpack overlay-policy;"
9+
content="require-trusted-types-for 'script'; trusted-types webpack webpack#dev-overlay;"
1010
/>
1111
<meta charset='UTF-8'>
1212
<title>webpack-dev-server</title>
@@ -24,7 +24,7 @@ const HTMLContentForTest = `
2424
<head>
2525
<meta
2626
http-equiv="Content-Security-Policy"
27-
content="require-trusted-types-for 'script'; trusted-types webpack overlay-policy;"
27+
content="require-trusted-types-for 'script'; trusted-types webpack webpack#dev-overlay;"
2828
/>
2929
<meta charset='UTF-8'>
3030
<title>test</title>

0 commit comments

Comments
 (0)