Forked from stevekrouse/insecureFetch
Public
Script
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
1
2
3
4
5
6
7
export function insecureFetch(input: string | URL | Request, init?: RequestInit) {
const origReq = new Request(input, init);
const proxyURL = new URL("https://unsecure-fetch.val-town.workers.dev");
proxyURL.searchParams.set("url", origReq.url);
const req = new Request(proxyURL, origReq);
return globalThis.fetch(req);
}
April 16, 2024