Skip to content

Commit a618fdd

Browse files
authored
Apply suggestions from code review
1 parent 00eb81a commit a618fdd

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/content/docs/en/reference/api-reference.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,6 @@ Allows customizing how the cookie is serialized.
372372

373373
### `Astro.redirect()`
374374

375-
<p><Since v="0.25.0" /></p>
376-
377375
**Type:** `(path: string, status?: number) => Response`
378376

379377
Allows you to redirect to another page, and optionally provide an [HTTP response status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages) as a second parameter.
@@ -382,7 +380,7 @@ A page (and not a child component) must `return` the result of `Astro.redirect()
382380

383381
For statically-generated sites, this will produce a client redirect using a [`<meta http-equiv="refresh">` tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#http-equiv) and does not support status codes.
384382

385-
When using SSR, status codes are supported. Astro will serve redirected requests with a status of `302` by default unless another code is specified.
383+
When using an on-demand rendering mode, status codes are supported. Astro will serve redirected requests with a default HTTP response status of `302` unless another code is specified.
386384

387385
The following example redirects a user to a login page:
388386

0 commit comments

Comments
 (0)