Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(docs): add security to docs #451

Merged
merged 13 commits into from
May 17, 2024
11 changes: 10 additions & 1 deletion docs/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default defineNuxtConfig({
extends: '@nuxt-themes/docus',
modules: ['@nuxtjs/plausible', '@nuxtlabs/github-module'],
modules: ['@nuxtjs/plausible', '@nuxtlabs/github-module', 'nuxt-security'],
experimental: {
// Need this otherwise vue-server-renderer not found
externalVue: false
Expand All @@ -10,5 +10,14 @@ export default defineNuxtConfig({
owner: 'Baroshem',
repo: 'nuxt-security',
branch: 'main'
},

security: {
headers: {
contentSecurityPolicy: {
'img-src': ["'self'", "data:", 'https:'] // Allow https: external images
},
crossOriginEmbedderPolicy: 'credentialless' // Allow youtube and stackblitz iframes
}
}
})
3 changes: 2 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"@nuxt-themes/docus": "^1.14.7",
"@nuxtjs/plausible": "^1.0.0",
"@nuxtlabs/github-module": "^1.6.3",
"nuxt": "^3.11.2"
"nuxt": "^3.11.2",
"nuxt-security": "^2.0.0-beta.4"
},
"resolutions": {
"string-width": "4.2.3",
Expand Down
Loading
Loading