forked from THU-MAIC/OpenMAIC
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
31 lines (28 loc) · 926 Bytes
/
next.config.ts
File metadata and controls
31 lines (28 loc) · 926 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
31
import type { NextConfig } from 'next';
const nextConfig: NextConfig = {
output: process.env.VERCEL ? undefined : 'standalone',
transpilePackages: ['mathml2omml', 'pptxgenjs'],
serverExternalPackages: [],
experimental: {
proxyClientMaxBodySize: '200mb',
},
async headers() {
const extraAncestors = process.env.ALLOWED_FRAME_ANCESTORS?.trim();
const frameAncestors = extraAncestors ? `'self' ${extraAncestors}` : "'self'";
return [
{
source: '/(.*)',
headers: [
// X-Frame-Options only supports SAMEORIGIN (no allow-list),
// so we omit it when custom ancestors are configured.
...(!extraAncestors ? [{ key: 'X-Frame-Options', value: 'SAMEORIGIN' }] : []),
{
key: 'Content-Security-Policy',
value: `frame-ancestors ${frameAncestors}`,
},
],
},
];
},
};
export default nextConfig;