Skip to content

Commit

Permalink
fixup! fix(middleware): fetch resource may be a URL instance
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Nov 12, 2021
1 parent 9df439b commit 1d7dfeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/server/web/sandbox/sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ function getFetchHeaders(middleware: string, init: RequestInit) {
return headers
}

function getFetchURL(input: unknown, headers: NodeHeaders = {}): string {
function getFetchURL(input: RequestInfo, headers: NodeHeaders = {}): string {
const initurl = isRequestLike(input) ? input.url : String(input)
if (initurl.startsWith('/')) {
const host = headers.host?.toString()
Expand Down

0 comments on commit 1d7dfeb

Please sign in to comment.