Unverified Commit 5d9310e3 authored by Sean Kiefer's avatar Sean Kiefer Committed by GitHub

update NextResponse default redirect status to 307 to match docs (#33505)

* fix: update default redirect status to 307 to match docs

* fix: update default redirect status to 307 to match docs
Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
parent 51f03592
......@@ -39,7 +39,7 @@ class BaseResponse extends Body implements Response {
}
}
static redirect(url: string, status = 302) {
static redirect(url: string, status = 307) {
if (!REDIRECTS.has(status)) {
throw new RangeError(
'Failed to execute "redirect" on "response": Invalid status code'
......
......@@ -73,7 +73,7 @@ export class NextResponse extends Response {
})
}
static redirect(url: string | NextURL | URL, status = 302) {
static redirect(url: string | NextURL | URL, status = 307) {
if (!REDIRECTS.has(status)) {
throw new RangeError(
'Failed to execute "redirect" on "response": Invalid status code'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment