Easy Helmet integration with Nuxt.js
Helmet helps you secure your Nuxt apps by setting various HTTP headers. By default Helmet will set the
X-DNS-Prefetch-Control
,X-Frame-Options
,Strict-Transport-Security
,X-Download-Options
,Expect-Ct
,Referrer-Policy
andX-Content-Type-Options
headers. Beside that this module will also set by default theX-Permitted-Cross-Domain-Policies
header.
๐ Release Notes | ๐ Helmet Docs
- Add
nuxt-helmet
dependency withyarn
ornpm
into your project - Add
nuxt-helmet
at the beginning of themodules
section ofnuxt.config.js
- Configure it:
{
modules: [
'nuxt-helmet'
//...other modules
],
// helmet options
// @see https://helmetjs.github.io/docs/
helmet: {
/*
frameguard: false,
...
*/
}
}
Content Security Policy
middleware is disabled by default on this module.
Visit Helmet documentation for detailed information about configurable options.
- Clone this repository
- Install dependencies using
yarn install
ornpm install
- Run
yarn dev:prepare
to generate type stubs. - Start development server using
yarn dev
Copyright (c) Victor Perez [email protected]