diff --git a/examples/client/trusted-types-overlay/README.md b/examples/client/trusted-types-overlay/README.md
index 55bb685238..4c2e4b7f5e 100644
--- a/examples/client/trusted-types-overlay/README.md
+++ b/examples/client/trusted-types-overlay/README.md
@@ -11,7 +11,7 @@ module.exports = {
devServer: {
client: {
overlay: {
- trustedTypesPolicyName: "overlay-policy",
+ trustedTypesPolicyName: "webpack#dev-overlay",
},
},
},
@@ -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".
```
diff --git a/examples/client/trusted-types-overlay/layout.html b/examples/client/trusted-types-overlay/layout.html
index 6787082976..b71ee9a7cf 100644
--- a/examples/client/trusted-types-overlay/layout.html
+++ b/examples/client/trusted-types-overlay/layout.html
@@ -5,7 +5,7 @@
WDS ▻ <%= htmlWebpackPlugin.options.title %>
diff --git a/examples/client/trusted-types-overlay/webpack.config.js b/examples/client/trusted-types-overlay/webpack.config.js
index 0c3d95144c..3009abed0c 100644
--- a/examples/client/trusted-types-overlay/webpack.config.js
+++ b/examples/client/trusted-types-overlay/webpack.config.js
@@ -16,7 +16,7 @@ const config = setup({
devServer: {
client: {
overlay: {
- trustedTypesPolicyName: "overlay-policy",
+ trustedTypesPolicyName: "webpack#dev-overlay",
},
},
},
diff --git a/test/e2e/overlay.test.js b/test/e2e/overlay.test.js
index ee8948bd9d..07d60fd7cc 100644
--- a/test/e2e/overlay.test.js
+++ b/test/e2e/overlay.test.js
@@ -782,7 +782,7 @@ describe("overlay", () => {
port,
client: {
overlay: {
- trustedTypesPolicyName: "overlay-policy",
+ trustedTypesPolicyName: "webpack#dev-overlay",
},
},
};
diff --git a/test/helpers/trusted-types-html-generator-plugin.js b/test/helpers/trusted-types-html-generator-plugin.js
index 3a3ee6d189..69e5866c46 100644
--- a/test/helpers/trusted-types-html-generator-plugin.js
+++ b/test/helpers/trusted-types-html-generator-plugin.js
@@ -6,7 +6,7 @@ const HTMLContentForIndex = `
webpack-dev-server
@@ -24,7 +24,7 @@ const HTMLContentForTest = `
test