Skip to content

Commit

Permalink
fix: match redirect and rewrite destination types (#34617)
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Feb 21, 2022
1 parent 411a9b8 commit 30b434b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/server/web/spec-extension/response.ts
Expand Up @@ -87,7 +87,7 @@ export class NextResponse extends Response {
})
}

static rewrite(destination: string | NextURL) {
static rewrite(destination: string | NextURL | URL) {
return new NextResponse(null, {
headers: {
'x-middleware-rewrite': validateURL(destination),
Expand Down

0 comments on commit 30b434b

Please sign in to comment.