-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnext.config.js
More file actions
30 lines (27 loc) · 781 Bytes
/
Copy pathnext.config.js
File metadata and controls
30 lines (27 loc) · 781 Bytes
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
const os = require('os');
function getLocalDevOrigins() {
const origins = ['localhost', 'localhost:3000', '127.0.0.1', '127.0.0.1:3000'];
const interfaces = os.networkInterfaces();
for (const name of Object.keys(interfaces)) {
for (const net of interfaces[name] || []) {
if ((net.family === 'IPv4' || net.family === 4) && !net.internal) {
origins.push(net.address);
origins.push(`${net.address}:3000`);
}
}
}
return origins;
}
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
images: {
unoptimized: true,
},
typescript: {
ignoreBuildErrors: false,
},
serverExternalPackages: ['pdf-parse', 'mammoth'],
allowedDevOrigins: getLocalDevOrigins(),
};
module.exports = nextConfig;