MediBot / next.config.js
github-actions[bot]
Deploy MedOS Global from 0b9218f6
102e23b
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
reactStrictMode: true,
swcMinify: true,
// Security headers
async headers() {
return [
{
source: '/(.*)',
headers: [
{ key: 'X-Content-Type-Options', value: 'nosniff' },
{ key: 'X-Frame-Options', value: 'ALLOWALL' }, // Allow iframe embedding
{ key: 'X-XSS-Protection', value: '1; mode=block' },
{ key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' },
{
key: 'Permissions-Policy',
value: 'microphone=(self), camera=(), geolocation=(self)',
},
],
},
{
source: '/sw.js',
headers: [
{ key: 'Cache-Control', value: 'no-cache, no-store, must-revalidate' },
{ key: 'Service-Worker-Allowed', value: '/' },
],
},
{
source: '/manifest.json',
headers: [
{ key: 'Content-Type', value: 'application/manifest+json' },
],
},
];
},
// Image optimization
images: {
formats: ['image/avif', 'image/webp'],
remotePatterns: [
{ protocol: 'https', hostname: '*.huggingface.co' },
],
},
// Disable powered-by header
poweredByHeader: false,
// Compress responses
compress: true,
};
module.exports = nextConfig;