Skip to content

Commit 4333304

Browse files
committed
docs: added explanation section
1 parent ada8dc8 commit 4333304

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/content/1.getting-started/2.configuration.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,9 @@ export default defineNuxtConfig({
186186

187187
## Using with tRPC Nuxt
188188

189-
In order to make the [CSRF](/security/csrf) functionality of this module work with [trpc-nuxt](https://github.com/wobsoriano/trpc-nuxt), we have to add the CSRF token value into a `csrf-token` header inside the outgoing request headers in our `trpc` client.
189+
TRPC [uses `POST` requests](https://trpc.io/docs/rpc#methods---type-mapping) for the mutation endpoints. Using the CSRF protection functionality of this module with [trpc-nuxt](https://github.com/wobsoriano/trpc-nuxt) will help you protect your mutation endpoints from CSRF.
190+
191+
In order to make the [CSRF](/security/csrf) functionality of this module work with `trpc-nuxt`, we have to add the CSRF token value into a `csrf-token` header inside the outgoing request headers in our `trpc` client.
190192

191193
```ts
192194
import { createTRPCNuxtClient, httpBatchLink } from "trpc-nuxt/client";

0 commit comments

Comments
 (0)