Skip to content
This repository has been archived by the owner on Dec 24, 2024. It is now read-only.

Commit

Permalink
refactor: fix security headers
Browse files Browse the repository at this point in the history
  • Loading branch information
agustinusnathaniel committed Jul 25, 2024
1 parent 434e077 commit e5de6db
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const securityHeaders = [
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
{
key: 'Referrer-Policy',
value: 'origin-when-cross-origin',
value: 'strict-origin-when-cross-origin',
},
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
{
Expand Down Expand Up @@ -68,14 +68,11 @@ const portfolioDataPrefix = `/_next/data/${process.env.PORTFOLIO_BUILD_ID}`;
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
// https://nextjs.org/docs/app/building-your-application/configuring/content-security-policy#without-nonces
headers: async () => {
return [
{
source: '/',
headers: securityHeaders,
},
{
source: '/:path*',
source: '/(.*)',
headers: securityHeaders,
},
];
Expand Down

0 comments on commit e5de6db

Please sign in to comment.