Skip to content

Commit 81f949d

Browse files
authored
Merge branch 'v6' into feat/disallow-get-image-client
2 parents af981af + afad7a0 commit 81f949d

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

src/content/docs/en/guides/upgrade-to/v6.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Astro v6.0 upgrades to Vite v7.0 as the development server and production bundle
9797

9898
If you are using Vite-specific plugins, configuration, or APIs, check the [Vite migration guide](https://vite.dev/guide/migration) for their breaking changes and upgrade your project as needed.
9999

100-
Using [Astro's `getViteConfig()` helper](/en/guides/testing/#vitest) requires Vitest v3.2 (Vitest v4 is not yet supported).
100+
Using [Astro's `getViteConfig()` helper](/en/guides/testing/#vitest) requires at least Vitest v3.2 or v4.1 beta 5.
101101

102102
### Vite Environment API
103103

src/content/docs/en/reference/modules/astro-middleware.mdx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ import type {
118118

119119
<p>
120120

121-
**Type:** `{ request: Request; params?: Params; userDefinedLocales?: string[]; defaultLocale: string; locals: App.Locals; }`<br />
121+
**Type:** `{ request: Request; params?: Params; userDefinedLocales?: string[]; defaultLocale: string; locals: App.Locals; clientAddress?: string }`<br />
122122
<Since v="2.8.0" />
123123
</p>
124124

@@ -174,6 +174,21 @@ An object for storing arbitrary information from a middleware, accessible to the
174174

175175
<ReadMore>Learn more about [storing data in `locals`](/en/guides/middleware/#storing-data-in-contextlocals) with example usage.</ReadMore>
176176

177+
178+
#### `CreateContext.clientAddress`
179+
180+
<p>
181+
182+
**Type:** `string`<br />
183+
<Since v="6.0.0" />
184+
</p>
185+
186+
The [IP address](https://en.wikipedia.org/wiki/IP_address) of the request.
187+
188+
This must be provided by the adapter or platform from a trusted source (e.g. socket address, platform-provided header).
189+
190+
If not provided, accessing `clientAddress` will throw an error.
191+
177192
## `astro` types
178193

179194
```js

0 commit comments

Comments
 (0)