Back
Version 31
11/22/2024
// using cf cache to speed up things.
const key = "26ea8f55a722b9c15571eef1c09614091068d70276d03378a31e199840772940";
const uuid = "1fd98a05-4959-42bc4-2f83-2c487c1cde6d";
const build = `https://${uuid}.cloudflarepreviews.com/?url=`;
export async function cfetch(input: string | URL, requestInit?: RequestInit) {
return fetch(`${build}${encodeURIComponent(input.toString())}`, {
...requestInit,
headers: {
"X-CF-Token": `${key}`,
"cf-ew-raw-Cookie": "apple=mango;",
"cf-raw-http": "true",
...requestInit?.headers ?? {},
},
});
}
const x = await cfetch("https://httpbin.org/cookies", {
headers: {
"Cookie": "apple=mango;",
},
});
console.log(await x.text());
Updated: November 23, 2024