mirror of
https://github.com/ArthurDanjou/trpc-nuxt.git
synced 2026-01-14 12:14:40 +01:00
update docs
This commit is contained in:
@@ -6,6 +6,10 @@ title: Authorization
|
||||
|
||||
The `createContext` function is called for each incoming request so here you can add contextual information about the calling user from the request object.
|
||||
|
||||
::alert{type="info"}
|
||||
Before you can access request headers in any context or middleware, you need to set the outgoing request headers. See [here](/get-started/tips/headers).
|
||||
::
|
||||
|
||||
## Create context from request headers
|
||||
|
||||
```ts [server/trpc/context.ts]
|
||||
Reference in New Issue
Block a user