Skip to content

Commit 818f766

Browse files
committed
fix
1 parent c6891f4 commit 818f766

File tree

1 file changed

+11
-1
lines changed
  • docs/content/1.documentation/3.middleware

1 file changed

+11
-1
lines changed

docs/content/1.documentation/3.middleware/7.csrf.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,17 @@ export default defineNuxtConfig({
2323
}
2424
})
2525
```
26-
26+
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)
27+
28+
```ts{}[nuxt.config.ts]
29+
export default {
30+
routeRules: {
31+
'/api/nocsrf': {
32+
csurf: false
33+
}
34+
}
35+
}
36+
```
2737
Now, you can use the auto-imported composables for handling CRSF:
2838

2939
```ts

0 commit comments

Comments
 (0)