github remix-run/remix csrf-middleware@0.2.0
csrf-middleware v0.2.0

latest releases: remix@3.0.0-rc.4, ui-hmr@0.1.1, tar-parser@0.8.1...
3 hours ago

Minor Changes

  • BREAKING CHANGE: csrf() now reads submitted tokens from headers and parsed form fields only by default. Requests that supply a token only in the query string are rejected. Applications that need query parameter tokens can retain that behavior with an explicit value resolver, which replaces the default lookup:

    -csrf()
    +csrf({
    +  value(context) {
    +    return context.url.searchParams.get('_csrf')
    +  },
    +})

Patch Changes

Don't miss a new remix release

NewReleases is sending notifications on new releases.