Skip to content

Commit

Permalink
feat-#397: add note about --host
Browse files Browse the repository at this point in the history
  • Loading branch information
Baroshem committed Mar 9, 2024
1 parent 3af487c commit df0d711
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/content/1.documentation/5.advanced/2.faq.md
Expand Up @@ -376,3 +376,26 @@ Alternatively, you can use the `external` attribute on `NuxtLink` to set the nav
::alert{type="info"}
ℹ Read more about it [here](https://github.com/Baroshem/nuxt-security/issues/228).
::

### Running app with `--host` flag

If you want to expose your app in local network to test it by using other devices you can do so by adding the following configuration:

```ts
security: {
headers: {
crossOriginEmbedderPolicy: process.env.NODE_ENV === 'development' ? 'unsafe-none' : 'require-corp', //https://github.com/Baroshem/nuxt-security/issues/101
strictTransportSecurity: false,
contentSecurityPolicy: {
"upgrade-insecure-requests": process.env.NODE_ENV === 'development' ? false : true // USE ONLY IN DEV MODE
}
},
corsHandler: {
origin:'*'
}
}
```

::alert{type="info"}
ℹ Read more about it [here](https://github.com/Baroshem/nuxt-security/issues/397).
::

0 comments on commit df0d711

Please sign in to comment.