mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Update CSP move it into next config
This commit is contained in:
parent
1ea0291e75
commit
e7fab85194
1 changed files with 20 additions and 0 deletions
|
|
@ -1,3 +1,17 @@
|
|||
const ContentSecurityPolicy = `
|
||||
default-src 'none';
|
||||
base-uri 'self';
|
||||
block-all-mixed-content;
|
||||
connect-src 'self' api-prod.omnivore.app api-demo.omnivore.app;
|
||||
font-src 'self';
|
||||
form-action 'self' api-prod.omnivore.app api-demo.omnivore.app;
|
||||
frame-ancestors 'none';
|
||||
frame-src 'none';
|
||||
manifest-src 'self';
|
||||
script-src script-src 'self' 'unsafe-inline';
|
||||
style-src 'self' 'unsafe-inline';
|
||||
`
|
||||
|
||||
const moduleExports = {
|
||||
images: {
|
||||
domains: [
|
||||
|
|
@ -24,6 +38,12 @@ const moduleExports = {
|
|||
destination: `https://api-${process.env.NEXT_PUBLIC_APP_ENV}.omnivore.app/api/mobile-auth/:path*`,
|
||||
},
|
||||
],
|
||||
Headers: [
|
||||
{
|
||||
key: 'Content-Security-Policy',
|
||||
value: ContentSecurityPolicy.replace(/\s{2,}/g, ' ').trim(),
|
||||
},
|
||||
],
|
||||
async redirects() {
|
||||
return [
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue