Skip to content

Commit

Permalink
fix: correct the calc of the public final url manually
Browse files Browse the repository at this point in the history
  • Loading branch information
esroyo committed Feb 22, 2024
1 parent a28d0af commit 8859d12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sjs-request-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export async function sjsRequestHandler(
pair[0],
typeof pair[1] === 'string' ? replaceOrigin(pair[1]) : pair[1],
] as [string, string]);
const publicSelfUrl = new URL(replaceOrigin(req.url), finalOriginUrl.origin)
const publicSelfUrl = new URL(req.url.replace(selfUrl.origin, finalOriginUrl.origin))
.toString();
if (CACHE) {
performance.mark('cache-read');
Expand Down

0 comments on commit 8859d12

Please sign in to comment.