temp yt polymer fix (fix properly when cors headers are fully parsed)

This commit is contained in:
ProgrammerIn-wonderland 2024-10-06 01:00:19 -04:00
parent 7e11458621
commit c4070bbd6d
No known key found for this signature in database

View file

@ -80,9 +80,13 @@ export async function swfetch(
) {
// TODO: i was against cors emulation but we might actually break stuff if we send full origin/referrer always
const url = new URL(decodeUrl(client.url));
if (url.toString().includes("youtube.com")) {
console.log(headers);
} else {
headers.set("Referer", url.toString());
headers.set("Origin", url.origin);
}
}
const cookies = this.cookieStore.getCookies(url, false);