Skip to content

Commit

Permalink
Merge pull request #488 from Baroshem/feat/#487
Browse files Browse the repository at this point in the history
feat-#487: local dev with nuxt devtools
  • Loading branch information
Baroshem committed Jul 16, 2024
2 parents b7701f1 + 338be11 commit 88dbb4c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
15 changes: 0 additions & 15 deletions docs/content/1.documentation/1.getting-started/1.setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,3 @@ security: {
```

You can find more about configuring `nuxt-security` [here](/documentation/getting-started/configuration).

## Using with Nuxt DevTools

In order to make this module work with Nuxt DevTools add following configuration to your projects:

```js{}[nuxt.config.ts]
export default defineNuxtConfig({
modules: ['nuxt-security', '@nuxt/devtools'],
security: {
headers: {
crossOriginEmbedderPolicy: process.env.NODE_ENV === 'development' ? 'unsafe-none' : 'require-corp',
},
},
});
```
1 change: 0 additions & 1 deletion playground/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export default defineNuxtConfig({
// Global configuration
security: {
headers: {
crossOriginEmbedderPolicy: false,
xXSSProtection: '0'
},
rateLimiter: {
Expand Down
2 changes: 1 addition & 1 deletion src/defaultConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const defaultSecurityConfig = (serverlUrl: string, strict: boolean) => {
headers: {
crossOriginResourcePolicy: 'same-origin',
crossOriginOpenerPolicy: 'same-origin',
crossOriginEmbedderPolicy: 'credentialless',
crossOriginEmbedderPolicy: process.env.NODE_ENV === 'development' ? 'unsafe-none' : 'credentialless',
contentSecurityPolicy: {
'base-uri': ["'none'"],
'font-src': ["'self'", 'https:', 'data:'],
Expand Down

0 comments on commit 88dbb4c

Please sign in to comment.