Files
unai/next.config.js
T
2025-07-14 10:14:20 +04:00

73 lines
1.5 KiB
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
// Enable experimental features
serverActions: {
allowedOrigins: ['localhost:3000', '127.0.0.1:3000']
},
},
// Allow dev origins
allowedDevOrigins: ['127.0.0.1:3000', 'localhost:3000'],
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'images.pexels.com',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'images.unsplash.com',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'plus.unsplash.com',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'localhost',
},
{
protocol: 'https',
hostname: 'supabase.co',
},
],
},
// Enable standalone output for Docker
output: 'standalone',
// PWA configuration
compiler: {
removeConsole: process.env.NODE_ENV === 'production',
},
// Security headers
async headers() {
return [
{
source: '/(.*)',
headers: [
{
key: 'X-Frame-Options',
value: 'DENY',
},
{
key: 'X-Content-Type-Options',
value: 'nosniff',
},
{
key: 'Referrer-Policy',
value: 'strict-origin-when-cross-origin',
},
{
key: 'Permissions-Policy',
value: 'camera=(), microphone=(), geolocation=()',
},
],
},
]
},
}
module.exports = nextConfig