Skip to content

Commit 0689fca

Browse files
committed
chore: applyheader before response
1 parent 4199c23 commit 0689fca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/next/src/middleware/request.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,9 @@ export class MiddlewareRequest extends Request {
7070
if (typeof destination === 'string' && destination.startsWith('/')) {
7171
destination = new URL(destination, this.url)
7272
}
73-
const response = await this.context.rewrite(destination)
7473
this.applyHeaders()
74+
const response = await this.context.rewrite(destination)
75+
7576
return new MiddlewareResponse(response, init)
7677
}
7778

0 commit comments

Comments
 (0)