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
and X-Content-Type-Options
headers. Beside that this module will also set by default the X-Permitted-Cross-Domain-Policies
header.
nuxt-helmet
dependency with yarn
or npm
into your projectnuxt-helmet
at the beginning of the modules
section of nuxt.config.js
{
modules: [
'nuxt-helmet'
//...other modules
],
// helmet options
// @see https://helmetjs.github.io/docs/
helmet: {
/*
frameguard: false,
...
*/
}
}
Use csp
property provided by Nuxt.js v2.11.0 for Content Security Policy (CSP) | 📖 Nuxt Docs
yarn install
or npm install
npm run dev
Author: victor-perez
Source Code: https://github.com/victor-perez/nuxt-helmet
#vuejs #vue #javascript #nuxtjs