2.2.1 • Published 10 months ago

@xarenas107/nuxt-uncsrf v2.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

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 ✨

2.2.1

10 months ago

2.2.0

10 months ago

2.1.1

10 months ago

2.1.0

10 months ago

2.0.6

1 year ago

2.0.5

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.2.0

1 year ago

1.2.5

1 year ago

1.3.3

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.3.0

1 year ago

1.2.1

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.1

1 year ago