Files
kooltab-backoffice/apps/dashboard/next.config.js
T
brammie15 314717ba3a
CI / build-and-test (push) Canceled after 0s
feat: move to V2
2026-10-29 11:21:52 +01:00

28 lines
1.1 KiB
JavaScript

const securityHeaders = [
{ key: 'X-Content-Type-Options', value: 'nosniff' },
{ key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' },
// The dashboard is never meant to be shown inside another site
{ key: 'X-Frame-Options', value: 'DENY' },
{ key: 'Permissions-Policy', value: 'camera=(), microphone=(), geolocation=(), payment=()' },
{ key: 'Strict-Transport-Security', value: 'max-age=31536000' },
];
/** @type {import('next').NextConfig} */
const nextConfig = {
poweredByHeader: false,
// A small server with only what it needs, for the Docker image
output: 'standalone',
outputFileTracingRoot: require('path').join(__dirname, '../..'),
// The shared package is TypeScript source
transpilePackages: ['@kooltap/shared'],
async headers() {
return [
{ source: '/:path*', headers: securityHeaders },
// Private pages: also keep them out of search engines that ignore robots.txt
{ source: '/dashboard/:path*', headers: [{ key: 'X-Robots-Tag', value: 'noindex, nofollow' }] },
];
},
};
module.exports = nextConfig;