![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/domains/lavocat.quebec/private_html/ |
const fs = require('fs');
const path = require('path');
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
// Production domain configuration
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'avocat.quebec',
},
{
protocol: 'https',
hostname: 'www.avocat.quebec',
},
{
protocol: 'https',
hostname: 'images.unsplash.com',
},
{
protocol: 'https',
hostname: 'localhost',
},
],
domains: [
'avocat.quebec',
'www.avocat.quebec',
'www.adwavocats.com',
],
},
// Production optimizations
experimental: {
optimizeCss: true,
optimizePackageImports: ['@chakra-ui/react', 'lucide-react'],
},
// Webpack configuration for production
webpack: (config, { isServer }) => {
if (!isServer) {
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
net: false,
tls: false,
};
}
// Production optimizations
if (!isServer) {
config.optimization = {
...config.optimization,
splitChunks: {
chunks: 'all',
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
chunks: 'all',
},
},
},
};
}
return config;
},
// Production headers
async headers() {
return [
{
source: '/:path*',
headers: [
{
key: 'Strict-Transport-Security',
value: 'max-age=31536000; includeSubDomains; preload'
},
{
key: 'X-Content-Type-Options',
value: 'nosniff'
},
{
key: 'X-Frame-Options',
value: 'DENY'
},
{
key: 'X-XSS-Protection',
value: '1; mode=block'
},
{
key: 'Referrer-Policy',
value: 'strict-origin-when-cross-origin'
},
{
key: 'Permissions-Policy',
value: 'camera=(), microphone=(), geolocation=()'
},
{
key: 'Content-Security-Policy',
value: "default-src 'self'; script-src 'self' 'unsafe-eval' 'unsafe-inline' https://js.stripe.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https:; connect-src 'self' https://api.stripe.com https://js.stripe.com wss:; frame-src https://js.stripe.com;"
}
]
},
{
source: '/uploads/:path*',
headers: [
{
key: 'X-Frame-Options',
value: 'SAMEORIGIN',
},
],
},
// Fix MIME types for production
{
source: '/_next/static/chunks/:path*',
headers: [
{
key: 'Content-Type',
value: 'application/javascript; charset=utf-8'
},
],
},
{
source: '/_next/static/css/:path*',
headers: [
{
key: 'Content-Type',
value: 'text/css; charset=utf-8'
},
],
},
{
source: '/:path*.js',
headers: [
{
key: 'Content-Type',
value: 'application/javascript; charset=utf-8'
},
],
},
{
source: '/:path*.css',
headers: [
{
key: 'Content-Type',
value: 'text/css; charset=utf-8'
},
],
},
];
},
// Production settings
trailingSlash: false,
poweredByHeader: false,
compress: true,
// Environment variables for production
env: {
CUSTOM_KEY: process.env.CUSTOM_KEY,
},
};
module.exports = nextConfig;