2.0.5 • Published 1 month ago
@xarenas107/nuxt-uncsrf v2.0.5
Nuxt Unscrf
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 themodules
section ofnuxt.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 ✨
2.0.5
1 month ago
2.0.3
2 months ago
2.0.2
2 months ago
2.0.1
2 months ago
2.0.0
2 months ago
1.2.0
2 months ago
1.2.5
2 months ago
1.3.3
2 months ago
1.2.4
2 months ago
1.2.3
2 months ago
1.2.2
2 months ago
1.3.0
2 months ago
1.2.1
2 months ago
1.1.7
3 months ago
1.1.6
3 months ago
1.1.5
3 months ago
1.1.4
3 months ago
1.1.3
3 months ago
1.1.2
3 months ago
1.1.1
3 months ago
1.1.0
3 months ago
1.0.4
3 months ago
1.0.3
3 months ago
1.0.1
3 months ago