fixing wrong variable usage for urlToRedirect

fixes #17
This commit is contained in:
Emilien 2024-12-16 00:04:37 +01:00
parent b6c6c0f545
commit a8c029a271

View file

@ -71,7 +71,7 @@ latestVersion.get("/", async (c) => {
const itagUrlParsed = new URL(itagUrl); const itagUrlParsed = new URL(itagUrl);
let urlToRedirect = itagUrlParsed.toString(); let urlToRedirect = itagUrlParsed.toString();
if (local) { if (local) {
urlToRedirect = itagUrlParsed.pathname + urlToRedirect.search + urlToRedirect = itagUrlParsed.pathname + itagUrlParsed.search +
"&host=" + itagUrlParsed.host; "&host=" + itagUrlParsed.host;
} }
return c.redirect(urlToRedirect); return c.redirect(urlToRedirect);