Morgbn / nuxt-csurf

Nuxt Cross-Site Request Forgery (CSRF) Prevention
https://nuxt-csurf.vercel.app
MIT License
77 stars 16 forks source link

Showing the config bug #36

Closed MikesGlitch closed 5 months ago

MikesGlitch commented 6 months ago

The issue:

In the playground, the nuxt config is setup for "POST" only, but the lib doesn't respect that. It's guarding PUT's as well.

  csurf: {
    https: false,
    methodsToProtect: ['POST']
  }

image

This is to do with the default that are setup in the module.ts

However, I'm not familiar with this, so I haven't fixed it here.

Any thoughts? @Morgbn