From d194d86107e1eb9ec6ef0e37780cfe5ba2efe5b0 Mon Sep 17 00:00:00 2001 From: Avory Date: Mon, 10 Feb 2025 02:58:43 +0200 Subject: [PATCH 1/4] Update next.config.mjs --- next.config.mjs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/next.config.mjs b/next.config.mjs index cccf4b58d..979b2a691 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -17,6 +17,32 @@ export default { eslint: { ignoreDuringBuilds: true, }, + + async headers() { + return [ + { + source: '/:path*', + headers: [ + { + key: 'X-DNS-Prefetch-Control', + value: 'on' + }, + { + key: 'Strict-Transport-Security', + value: 'max-age=31536000; includeSubDomains' + }, + { + key: 'X-Frame-Options', + value: 'SAMEORIGIN' + }, + { + key: 'X-Content-Type-Options', + value: 'nosniff' + } + ], + }, + ] + }, // Don't put redirects here // they go in public/_redirects From e1ac8cd287b421d80e2f6417d9a6692c7a2fbf1f Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Tue, 18 Feb 2025 16:27:18 +0100 Subject: [PATCH 2/4] Update next.config.mjs --- next.config.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/next.config.mjs b/next.config.mjs index 979b2a691..68cebb686 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -29,7 +29,7 @@ export default { }, { key: 'Strict-Transport-Security', - value: 'max-age=31536000; includeSubDomains' + value: 'max-age=86400; includeSubDomains' }, { key: 'X-Frame-Options', From 49a30b1f66376d8f92e6a3346bd6d1bbd7f00d19 Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Tue, 18 Feb 2025 16:27:25 +0100 Subject: [PATCH 3/4] Update next.config.mjs --- next.config.mjs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/next.config.mjs b/next.config.mjs index 68cebb686..64cee68b4 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -31,10 +31,6 @@ export default { key: 'Strict-Transport-Security', value: 'max-age=86400; includeSubDomains' }, - { - key: 'X-Frame-Options', - value: 'SAMEORIGIN' - }, { key: 'X-Content-Type-Options', value: 'nosniff' From b32e5421f6c3ba3b77a57eb5e01ad94676ab47d7 Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Tue, 18 Feb 2025 16:33:37 +0100 Subject: [PATCH 4/4] Update next.config.mjs Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- next.config.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/next.config.mjs b/next.config.mjs index 64cee68b4..0bbf778c3 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -29,11 +29,15 @@ export default { }, { key: 'Strict-Transport-Security', - value: 'max-age=86400; includeSubDomains' + value: 'max-age=31536000; includeSubDomains; preload' }, { key: 'X-Content-Type-Options', value: 'nosniff' + }, + { + key: 'X-Frame-Options', + value: 'DENY' } ], },