Skip to content

Commit

Permalink
fix(prerender): decode urls to allow comma in the x-nitro-prerender
Browse files Browse the repository at this point in the history
… header (#799)
  • Loading branch information
posixpascal authored and pi0 committed Jan 16, 2023
1 parent a182749 commit a3e3086
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/prerender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,10 @@ function extractLinks(

// Extract from x-nitro-prerender headers
const header = res.headers.get("x-nitro-prerender") || "";
_links.push(...header.split(",").map((i) => i.trim()));
_links.push(...header.split(",")
.map((i) => i.trim())
.map((i) => decodeURIComponent(i));


for (const link of _links.filter(Boolean)) {
const parsed = parseURL(link);
Expand Down

0 comments on commit a3e3086

Please sign in to comment.