-
Notifications
You must be signed in to change notification settings - Fork 16
/
next.config.cjs
41 lines (37 loc) · 958 Bytes
/
next.config.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Contains shared configuration for all Next.js apps in the workspace.
const { createSecureHeaders } = require('next-secure-headers');
const securityHeaders = createSecureHeaders({
frameGuard: 'sameorigin',
xssProtection: 'block-rendering',
referrerPolicy: 'no-referrer-when-downgrade',
}).concat([
{
key: 'Content-Security-Policy',
value: 'upgrade-insecure-requests',
},
{
key: 'Permissions-Policy',
value: 'camera=(), microphone=(), geolocation=(), browsing-topics=()',
},
]);
/**
* @type {import('next').NextConfig}
**/
const nextConfig = {
async headers() {
return [
{
source: '/', // Netlify preview link doesn't work without this
headers: securityHeaders,
},
{
source: '/(.*)',
headers: securityHeaders,
},
];
},
images: {
domains: ['images.unsplash.com'], // TODO: update when adding api for blueprints
},
};
module.exports = nextConfig;