feat: add sitemap / robots.txt etc etc
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user