mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 06:50:01 -04:00
temp yt polymer fix (fix properly when cors headers are fully parsed)
This commit is contained in:
parent
7e11458621
commit
c4070bbd6d
1 changed files with 6 additions and 2 deletions
|
@ -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
|
// 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));
|
const url = new URL(decodeUrl(client.url));
|
||||||
|
if (url.toString().includes("youtube.com")) {
|
||||||
|
console.log(headers);
|
||||||
|
} else {
|
||||||
headers.set("Referer", url.toString());
|
headers.set("Referer", url.toString());
|
||||||
headers.set("Origin", url.origin);
|
headers.set("Origin", url.origin);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const cookies = this.cookieStore.getCookies(url, false);
|
const cookies = this.cookieStore.getCookies(url, false);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue