Skip to content

Commit

Permalink
Merge pull request #451 from Baroshem/feat/score-banner
Browse files Browse the repository at this point in the history
feat(docs): add security to docs
  • Loading branch information
vejja authored May 17, 2024
2 parents 47ed844 + b5fddb7 commit 99d6dee
Show file tree
Hide file tree
Showing 5 changed files with 1,189 additions and 802 deletions.
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

0 comments on commit 99d6dee

Please sign in to comment.