First Commit
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
|
||||
const cspHeader = `
|
||||
default-src 'self';
|
||||
script-src 'self' 'unsafe-eval' 'unsafe-inline';
|
||||
style-src 'self' 'unsafe-inline';
|
||||
img-src 'self' blob: data: https://flagcdn.com;
|
||||
font-src 'self';
|
||||
object-src 'self';
|
||||
base-uri 'self';
|
||||
form-action 'self';
|
||||
frame-ancestors 'self';
|
||||
connect-src 'self' https://cdn.jsdelivr.net;
|
||||
`;
|
||||
|
||||
const nextConfig = {
|
||||
modularizeImports: {
|
||||
'@mui/material': {
|
||||
transform: '@mui/material/{{member}}'
|
||||
},
|
||||
'@mui/lab': {
|
||||
transform: '@mui/lab/{{member}}'
|
||||
}
|
||||
},
|
||||
images: {
|
||||
remotePatterns: [
|
||||
{
|
||||
protocol: 'https',
|
||||
hostname: 'flagcdn.com',
|
||||
pathname: '**'
|
||||
}
|
||||
]
|
||||
},
|
||||
async headers() {
|
||||
return [
|
||||
{
|
||||
source: '/(.*)',
|
||||
headers: [
|
||||
{
|
||||
key: 'Content-Security-Policy',
|
||||
value: cspHeader.replace(/\n/g, '')
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
Reference in New Issue
Block a user