@xarenas107/nuxt-uncsrf

Nuxt module for csrf protection
855
Install
npm install @xarenas107/nuxt-uncsrf
Latest Version:2.2.6
Older releases:3
License:MIT
Last Updated:Jul 19, 2025
Links: GitHub  ·  npm
Maintainer: xarenas107

Nuxt Unscrf

npm version npm downloads License Nuxt

My new Nuxt module for doing amazing things.

🚀 Features

  • ⛰ Nuxt 3 ready
  • 👌 Zero config: Configuration for common use cases
  • ⚡ Nitro ready: Customizable nitro storage.
  • ⚙️ Auto import: Provide auto import functions.
  • 🦾 Type strong: Written in typescript

📦 Install

npm i @xarenas107/nuxt-uncsrf -D 

🦄 Usage

Add @xarenas107/nuxt-uncsrf to the modules section of nuxt.config.ts.

export default defineNuxtConfig({
  modules: [
    '@xarenas107/nuxt-uncsrf'
  ]
})

By default csrf protection is applied to all routes except for /_nuxt and /__nuxt with GET method. If you need more control, use nitro route rules.

Use false to disable protection

routeRules:{
  '/locale/**': {
    uncsrf: false,
  }
}

You can customize storage

// define storage on `nuxt.config.ts`
export default defineNuxtConfig({
  uncsrf:{
    storage:{
      driver:'memory'
    }
  }
})

Or use a previously defined storage'

export default defineNuxtConfig({
  nitro:{
    storage:{
      'security':{
        driver:'memory',
      }
    }
  },
  uncsrf:{
    storage:'security'
  } 
})

That's it! You can now use @nuxt/uncsrf in your Nuxt app ✨

Related Packages

nuxt-csurf

Nuxt Cross-Site Request Forgery (CSRF) Prevention

6,263,746 91
@privyid/nuxt-csrf

Module CSRF for NUXT

26,088 9
@csrf-armor/nuxt

Nuxt module for CSRF protection powered by csrf-armor

1,651 7
nuxt-api-shield

Nuxt API Shield - Rate Limiting

71,335 55
which-nuxt

Detect Nuxt, Vue and Nuxt-related package versions from public Nuxt sites.

7,790 1

Version History

Version Released Vue License
2.2.6 MIT
2.2.5 MIT
2.2.4 MIT
2.2.3 MIT
2.2.2 MIT