-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
70 lines (67 loc) · 2.13 KB
/
next.config.js
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/** @type {import('next').NextConfig} */
const nextConfig = {
// Fixes A Problem With The Canvas Element In Linkedom package --> https://github.com/WebReflection/linkedom/issues/237#issuecomment-1812031246
// webpack: config => ({
// ...config,
// resolve: {
// ...config.resolve,
// alias: {
// ...config.resolve?.alias,
// canvas$: false,
// },
// },
// }),
// --------------------------------------
reactStrictMode: false,
images: {
remotePatterns: [{ protocol: 'http', hostname: '127.0.0.1', port: '8090' }],
},
async headers() {
return [
{
source: '/(.*)',
headers: [
// TODO: SET THIS IN PRODUCTION
// {
// key: 'Content-Security-Policy',
// value: "default-src 'self';",
// EXAMPLE VALUE HERE:
// value:
// "base-uri 'self'; default-src 'self'; form-action 'self'; child-src 'self'; frame-ancestors 'self';",
// },
{
key: 'Access-Control-Allow-Origin',
value: 'http://localhost:3000 https://lh3.googleusercontent.com',
},
{
key: 'Access-Control-Allow-Methods',
value: 'GET, POST',
},
{
key: 'Access-Control-Allow-Headers',
value: 'Content-Type, Authorization, User-Agent, Accept',
},
{
key: 'Strict-Transport-Security',
value: 'max-age=63072000; includeSubDomains; preload',
},
{
// More Here --> https://nextjs.org/docs/app/api-reference/next-config-js/headers#x-content-type-options
key: 'X-Content-Type-Options',
value: 'nosniff',
},
// { THIS IS THE DEFAULT (NO NEED TO SET) --> https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#strict-origin-when-cross-origin
// key: 'referrer-policy',
// value: 'strict-origin-when-cross-origin',
// },
],
},
];
},
// experimental: {
// serverActions: {
// bodySizeLimit: '50mb',
// },
// },
};
module.exports = nextConfig;