feat: Add security headers to all routes

This commit is contained in:
zaidmukaddam 2024-09-05 16:51:54 +05:30
parent 0e8a6abe82
commit 1d633b7556

View File

@ -1,5 +1,26 @@
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
async headers() {
return [
{
source: '/(.*)',
headers: [
{
key: 'X-Content-Type-Options',
value: 'nosniff',
},
{
key: 'X-Frame-Options',
value: 'DENY',
},
{
key: 'Referrer-Policy',
value: 'strict-origin-when-cross-origin',
},
],
},
]
},
images: { images: {
dangerouslyAllowSVG: true, dangerouslyAllowSVG: true,
remotePatterns: [ remotePatterns: [