@nuxt/docs-nightly 4.5.0-29739645.a75a9b92 → 4.5.0-29739713.e01e04a0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -345,6 +345,10 @@ NUXT_GITHUB_TOKEN='<my-super-token>'
|
|
|
345
345
|
```
|
|
346
346
|
::
|
|
347
347
|
|
|
348
|
+
::note
|
|
349
|
+
Giving the `event` as argument to `useRuntimeConfig` is optional, but it is recommended to pass it to get the runtime config overwritten by [environment variables](/docs/4.x/guide/going-further/runtime-config#environment-variables) at runtime for server routes.
|
|
350
|
+
::
|
|
351
|
+
|
|
348
352
|
### Request Cookies
|
|
349
353
|
|
|
350
354
|
```ts [server/api/cookies.ts]
|
|
@@ -146,6 +146,10 @@ export default defineEventHandler(async (event) => {
|
|
|
146
146
|
})
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
+
::note
|
|
150
|
+
Giving the `event` as argument to `useRuntimeConfig` is optional, but it is recommended to pass it to get the runtime config overwritten by [environment variables](/docs/4.x/guide/going-further/runtime-config#environment-variables) at runtime for server routes.
|
|
151
|
+
::
|
|
152
|
+
|
|
149
153
|
## Typing Runtime Config
|
|
150
154
|
|
|
151
155
|
Nuxt tries to automatically generate a typescript interface from provided runtime config using [unjs/untyped](https://github.com/unjs/untyped).
|