Update: nueva version Horux Despachos
This commit is contained in:
36
apps/web/next.config.js
Normal file
36
apps/web/next.config.js
Normal file
@@ -0,0 +1,36 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
transpilePackages: ['@horux/shared'],
|
||||
async rewrites() {
|
||||
return [
|
||||
{
|
||||
source: '/api/:path*',
|
||||
destination: 'http://localhost:4000/api/:path*',
|
||||
},
|
||||
{
|
||||
source: '/health',
|
||||
destination: 'http://localhost:4000/health',
|
||||
},
|
||||
];
|
||||
},
|
||||
// Security headers aplicados a todas las rutas. Protegen de clickjacking
|
||||
// (terceros embebiendo Horux 360 en iframes propios), MIME sniffing y
|
||||
// referrer leakage. Nuestro propio /terminos embebe el PDF desde el mismo
|
||||
// origen así que frame-ancestors 'self' no lo rompe.
|
||||
async headers() {
|
||||
return [
|
||||
{
|
||||
source: '/:path*',
|
||||
headers: [
|
||||
{ key: 'X-Frame-Options', value: 'SAMEORIGIN' },
|
||||
{ key: 'Content-Security-Policy', value: "frame-ancestors 'self'" },
|
||||
{ key: 'X-Content-Type-Options', value: 'nosniff' },
|
||||
{ key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' },
|
||||
{ key: 'Strict-Transport-Security', value: 'max-age=31536000; includeSubDomains' },
|
||||
],
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = nextConfig;
|
||||
Reference in New Issue
Block a user