Skip to content

Commit

Permalink
Revert "Update headers and CSP value (#7904)" (#7920)
Browse files Browse the repository at this point in the history
This reverts commit a11a9e0.

Co-authored-by: Jacob Logan <lognjc@amazon.com>
  • Loading branch information
jacoblogan and Jacob Logan authored Aug 27, 2024
1 parent a11a9e0 commit 4f081f7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
6 changes: 1 addition & 5 deletions customHttp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ customHeaders:
value: '1; mode=block'
- key: 'X-Content-Type-Options'
value: 'nosniff'
- key: 'Cache-Control'
value: 'no-store, no-cache'
- key: 'Pragma'
value: 'no-cache'
- key: 'Content-Security-Policy'
value: "upgrade-insecure-requests; frame-ancestors 'none';"
value: 'upgrade-insecure-requests;'
# CSP also set in _document.tsx meta tag
5 changes: 0 additions & 5 deletions src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ const getCspContent = (context) => {
if (process.env.BUILD_ENV !== 'production') {
return `
default-src 'none';
object-src 'none';
base-uri 'none';
style-src 'self' 'unsafe-inline' ${ANALYTICS_CSP.all.style.join(' ')};
font-src 'self' data:;
frame-src 'self' https://www.youtube-nocookie.com ${ANALYTICS_CSP.all.frame.join(
Expand All @@ -87,8 +85,6 @@ const getCspContent = (context) => {
// Have to keep track of CSP inside customHttp.yml as well
return `
default-src 'none';
object-src 'none';
base-uri 'none';
style-src 'self' 'unsafe-inline' ${ANALYTICS_CSP.all.style.join(' ')};
font-src 'self';
frame-src 'self' https://www.youtube-nocookie.com ${ANALYTICS_CSP.all.frame.join(
Expand All @@ -106,7 +102,6 @@ const getCspContent = (context) => {
script-src 'self' ${cspInlineScriptHash} ${ANALYTICS_CSP.prod.script.join(
' '
)} ${ANALYTICS_CSP.all.script.join(' ')};
require-trusted-types-for 'script';
`;
};

Expand Down

0 comments on commit 4f081f7

Please sign in to comment.