Files
api-ping/next.config.mjs
2025-08-16 23:59:05 +02:00

30 líneas
564 B
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
// Configuración para proxy reverso (nginx)
async headers() {
return [
{
source: '/api/:path*',
headers: [
{
key: 'X-Forwarded-Proto',
value: 'https',
},
],
},
];
},
// Configuración experimental para mejorar el manejo de headers
experimental: {
serverComponentsExternalPackages: ['ping'],
},
// Configuración de red
env: {
TRUST_PROXY: 'true',
},
};
export default nextConfig;