codetabs - fetch a public URL and return it with CORS headers
GET /v1/proxy?quest=address
POST, PUT, DELETE, ... the same
Fetches address and writes the answer back with Access-Control-Allow-Origin: *, so that a script on another origin may read it. The method, the headers and the body of the request are passed on. Runs without state or accounts.
codetabs: fetch any web address from here, with CORS headers on the answer
The answer as it came, status and headers included:
curl 'https://www.codetabs.net/v1/proxy?quest=https://httpbun.com/anything/fetch-me'
Your method, headers and body are passed on:
curl -X POST -H 'Content-Type: application/json' -d '{"a":1}' 'https://www.codetabs.net/v1/proxy?quest=https://httpbun.com/anything/post-me'
If you can only send a GET, name the method and the body in the query, before the address:
curl 'https://www.codetabs.net/v1/proxy?verb=POST&body=a%3D1&quest=https://httpbun.com/anything/post-me'
From a web page:
fetch('https://www.codetabs.net/v1/proxy?quest=https://httpbun.com/anything/fetch-me').then(r => r.text())
httpbun.com in these examples is a public test service that answers with a description of the request it got.
http and https only. Redirects are followed. No key, no account.
Answers larger than 5 MiB are cut. Cookies of the other side are not passed back. The section on caching was never written.
curl(1), fetch(3)