From 40e3dc12aef39059d4b07411fd9bbdf07c107478 Mon Sep 17 00:00:00 2001 From: William Chong Date: Wed, 4 Dec 2024 02:12:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=94=92=EF=B8=8F=20Add=20nuxt-helmet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions/package-lock.json | 18 ++++++++++++++++++ functions/package.json | 1 + src/package-lock.json | 18 ++++++++++++++++++ src/package.json | 1 + 4 files changed, 38 insertions(+) diff --git a/functions/package-lock.json b/functions/package-lock.json index 68154d088..cc4053306 100644 --- a/functions/package-lock.json +++ b/functions/package-lock.json @@ -56,6 +56,7 @@ "marked": "^5.1.2", "node-fetch": "^2.6.7", "nuxt-facebook-pixel-module": "^1.6.0", + "nuxt-helmet": "^2.1.1", "nuxt-start": "^2.17.2", "portal-vue": "^1.5.1", "querystring": "^0.2.1", @@ -16903,6 +16904,23 @@ "minimatch": "^3.0.4" } }, + "node_modules/nuxt-helmet": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nuxt-helmet/-/nuxt-helmet-2.1.1.tgz", + "integrity": "sha512-NexHXShgLMYGin4ovFoMEeRux+xQzKMyJnMPBMH5GdLxCL+pSqNrSQ13jCSbSrAsTAtWxxwvJH3afAD7ns6/zw==", + "dependencies": { + "consola": "^2.11.3", + "helmet": "^4.6.0" + } + }, + "node_modules/nuxt-helmet/node_modules/helmet": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/helmet/-/helmet-4.6.0.tgz", + "integrity": "sha512-HVqALKZlR95ROkrnesdhbbZJFi/rIVSoNq6f3jA/9u6MIbTsPh3xZwihjeI5+DO/2sOV6HMHooXcEOuwskHpTg==", + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/nuxt-start": { "version": "2.17.2", "resolved": "https://registry.npmjs.org/nuxt-start/-/nuxt-start-2.17.2.tgz", diff --git a/functions/package.json b/functions/package.json index 932f5cc41..7063feee6 100644 --- a/functions/package.json +++ b/functions/package.json @@ -63,6 +63,7 @@ "marked": "^5.1.2", "node-fetch": "^2.6.7", "nuxt-facebook-pixel-module": "^1.6.0", + "nuxt-helmet": "^2.1.1", "nuxt-start": "^2.17.2", "portal-vue": "^1.5.1", "querystring": "^0.2.1", diff --git a/src/package-lock.json b/src/package-lock.json index b874b457a..1f5c10e09 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -56,6 +56,7 @@ "node-fetch": "^2.6.0", "nuxt": "^2.17.2", "nuxt-facebook-pixel-module": "^1.6.0", + "nuxt-helmet": "^2.1.1", "portal-vue": "^2.1.7", "postcss": "^8.4.14", "querystring": "^0.2.1", @@ -28645,6 +28646,14 @@ "node": ">=10.0.0" } }, + "node_modules/helmet": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/helmet/-/helmet-4.6.0.tgz", + "integrity": "sha512-HVqALKZlR95ROkrnesdhbbZJFi/rIVSoNq6f3jA/9u6MIbTsPh3xZwihjeI5+DO/2sOV6HMHooXcEOuwskHpTg==", + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/hex-color-regex": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz", @@ -35687,6 +35696,15 @@ "minimatch": "^3.0.4" } }, + "node_modules/nuxt-helmet": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nuxt-helmet/-/nuxt-helmet-2.1.1.tgz", + "integrity": "sha512-NexHXShgLMYGin4ovFoMEeRux+xQzKMyJnMPBMH5GdLxCL+pSqNrSQ13jCSbSrAsTAtWxxwvJH3afAD7ns6/zw==", + "dependencies": { + "consola": "^2.11.3", + "helmet": "^4.6.0" + } + }, "node_modules/nwsapi": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", diff --git a/src/package.json b/src/package.json index 6f9e6494b..6add93a5b 100644 --- a/src/package.json +++ b/src/package.json @@ -76,6 +76,7 @@ "node-fetch": "^2.6.0", "nuxt": "^2.17.2", "nuxt-facebook-pixel-module": "^1.6.0", + "nuxt-helmet": "^2.1.1", "portal-vue": "^2.1.7", "postcss": "^8.4.14", "querystring": "^0.2.1", From a8f1f6e9fe0fd7703ac2e3c632ed5924d62071e8 Mon Sep 17 00:00:00 2001 From: William Chong Date: Thu, 12 Dec 2024 19:51:39 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=94=92=EF=B8=8F=20Allow=20referrer=20?= =?UTF-8?q?in=20helmet=20for=20authcore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/nuxt.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/nuxt.config.js b/src/nuxt.config.js index 96d283c9d..d4dbb3336 100644 --- a/src/nuxt.config.js +++ b/src/nuxt.config.js @@ -305,6 +305,11 @@ const nuxtConfig = { }, }, }, + + helmet: { + referrerPolicy: { policy: 'strict-origin' }, + }, + /* ** Global CSS */