-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
199bd52
commit 3c18e3e
Showing
1 changed file
with
13 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,16 +5,16 @@ | |
// But unsafe-eval should NOT be in production builds | ||
// Also, put GTM first because sometimes the ';' in the escaped single quotes causes the browser to think it's the end | ||
const scriptSrc = process.env.NODE_ENV === 'development' ? | ||
`https://*.googletagmanager.com 'self' 'unsafe-inline' 'unsafe-eval'` | ||
: `https://*.googletagmanager.com 'self' 'unsafe-inline'`; | ||
`https://*.googletagmanager.com https://cdn.jsdelivr.net 'self' 'unsafe-inline' 'unsafe-eval'` | ||
: `https://*.googletagmanager.com https://cdn.jsdelivr.net 'self' 'unsafe-inline'`; | ||
|
||
const contentSecurityPolicy = ` | ||
default-src 'none'; | ||
base-uri 'self'; | ||
manifest-src 'self'; | ||
script-src ${scriptSrc}; | ||
style-src 'self' 'unsafe-inline'; | ||
font-src 'self'; | ||
style-src https://cdn.jsdelivr.net 'self' 'unsafe-inline'; | ||
font-src https://cdn.jsdelivr.net 'self'; | ||
img-src 'self' https://*.googletagmanager.com https://*.google-analytics.com data:; | ||
media-src 'self'; | ||
form-action 'self'; | ||
|
@@ -157,5 +157,14 @@ module.exports = async function createConfigAsync() { | |
//... other Algolia params | ||
}, | ||
}), | ||
stylesheets: [ | ||
{ | ||
href: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css', | ||
type: 'text/css', | ||
integrity: | ||
'sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM', | ||
crossorigin: 'anonymous', | ||
}, | ||
], | ||
}; | ||
}; |