feat: add sitemap / robots.txt etc etc

This commit is contained in:
2026-10-13 22:18:09 +02:00
parent db06276a4f
commit df90cf8a18
20 changed files with 226 additions and 7 deletions
+21 -2
View File
@@ -1,3 +1,22 @@
const nextConfig = {};
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' },
];
module.exports = nextConfig;
/** @type {import('next').NextConfig} */
const nextConfig = {
poweredByHeader: false,
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;