![]() 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.ca/private_html/ |
const fs = require('fs');
const path = require('path');
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
// Allow cross-origin requests from network IP
allowedDevOrigins: ['lavocat.ca', 'www.lavocat.ca', 'localhost', '127.0.0.1'],
// Configure images - HTTPS only
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'localhost',
},
{
protocol: 'https',
hostname: 'lavocat.ca',
},
{
protocol: 'https',
hostname: 'www.lavocat.ca',
},
{
protocol: 'https',
hostname: 'action-collective.info',
},
{
protocol: 'https',
hostname: 'images.unsplash.com',
},
],
domains: [
'www.adwavocats.com',
// add other allowed domains here if needed
],
},
// Disable experimental features temporarily to fix Watchpack issue
experimental: {
// scrollRestoration: true, // Temporarily disabled
},
// Configure HTTPS for development
webpack: (config, { isServer }) => {
if (!isServer) {
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
net: false,
tls: false,
};
}
// Suppress CSS vendor prefix warnings in development
if (process.env.NODE_ENV === 'development') {
config.infrastructureLogging = {
level: 'error',
};
}
return config;
},
// Ensure proper asset prefix in development
assetPrefix: process.env.NODE_ENV === 'development' ? undefined : undefined,
// Configure base path if needed
basePath: '',
// Configure trailing slashes
trailingSlash: false,
// Configure headers with enhanced security
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=()'
}
]
},
{
source: '/uploads/:path*',
headers: [
{
key: 'X-Frame-Options',
value: 'SAMEORIGIN',
},
],
},
];
}
};
module.exports = nextConfig;