Skip to content

Commit 4f081f7

Browse files
jacobloganJacob Logan
andauthored
Revert "Update headers and CSP value (#7904)" (#7920)
This reverts commit a11a9e0. Co-authored-by: Jacob Logan <[email protected]>
1 parent a11a9e0 commit 4f081f7

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

customHttp.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ customHeaders:
1212
value: '1; mode=block'
1313
- key: 'X-Content-Type-Options'
1414
value: 'nosniff'
15-
- key: 'Cache-Control'
16-
value: 'no-store, no-cache'
17-
- key: 'Pragma'
18-
value: 'no-cache'
1915
- key: 'Content-Security-Policy'
20-
value: "upgrade-insecure-requests; frame-ancestors 'none';"
16+
value: 'upgrade-insecure-requests;'
2117
# CSP also set in _document.tsx meta tag

src/pages/_document.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ const getCspContent = (context) => {
6262
if (process.env.BUILD_ENV !== 'production') {
6363
return `
6464
default-src 'none';
65-
object-src 'none';
66-
base-uri 'none';
6765
style-src 'self' 'unsafe-inline' ${ANALYTICS_CSP.all.style.join(' ')};
6866
font-src 'self' data:;
6967
frame-src 'self' https://www.youtube-nocookie.com ${ANALYTICS_CSP.all.frame.join(
@@ -87,8 +85,6 @@ const getCspContent = (context) => {
8785
// Have to keep track of CSP inside customHttp.yml as well
8886
return `
8987
default-src 'none';
90-
object-src 'none';
91-
base-uri 'none';
9288
style-src 'self' 'unsafe-inline' ${ANALYTICS_CSP.all.style.join(' ')};
9389
font-src 'self';
9490
frame-src 'self' https://www.youtube-nocookie.com ${ANALYTICS_CSP.all.frame.join(
@@ -106,7 +102,6 @@ const getCspContent = (context) => {
106102
script-src 'self' ${cspInlineScriptHash} ${ANALYTICS_CSP.prod.script.join(
107103
' '
108104
)} ${ANALYTICS_CSP.all.script.join(' ')};
109-
require-trusted-types-for 'script';
110105
`;
111106
};
112107

0 commit comments

Comments
 (0)