Skip to content

Commit

Permalink
Merge pull request #471 from moshetanzer/main
Browse files Browse the repository at this point in the history
  • Loading branch information
Baroshem authored Jun 3, 2024
2 parents c6891f4 + 818f766 commit fd47d83
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/content/1.documentation/3.middleware/7.csrf.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,17 @@ export default defineNuxtConfig({
}
})
```

You can directly define per route settings using the `csurf` config (which is the underlying package used for CSRF protection in this library. This should be used directly, not in a `security` object)

```ts{}[nuxt.config.ts]
export default {
routeRules: {
'/api/nocsrf': {
csurf: false
}
}
}
```
Now, you can use the auto-imported composables for handling CRSF:

```ts
Expand Down

0 comments on commit fd47d83

Please sign in to comment.