codeExploreHelpSign in
tabs / codetabs-proxypublic

Small HTTP proxy that adds permissive CORS headers to public responses

CodeIssues 3Pull requests 0Releases 6
tabs  readme: say where the demo lives  4e1c9a7
cmd/move main out of the root3 years ago
internal/relay/follow redirects ourselves, check every hop2 years ago
web/demo page: form posts to the right place now2 years ago
.gitignorefirst commit4 years ago
Dockerfilesmaller image2 years ago
LICENSEfirst commit4 years ago
README.mdreadme: say where the demo lives14 months ago
go.modbump2 years ago
README.md

codetabs-proxy

buildpassinglicenseMITdemoup

Single-binary relay for local development and static front ends.

This is the public demo instance, running the main branch at codetabs.dev. Use it for what you like; if you depend on it, run your own.

Usage

codetabs-proxy: 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.dev/v1/proxy?quest=https://httpbin.org/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.dev/v1/proxy?quest=https://httpbin.org/anything/post-me'

From a web page:
    fetch('https://www.codetabs.dev/v1/proxy?quest=https://httpbin.org/anything/fetch-me').then(r => r.text())

httpbin.org 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.

Try the demo

Address:

Run your own

docker build -t codetabs-proxy .
docker run -p 8080:8080 codetabs-proxy

Configuration is by environment variables. They are listed in docs/config.md, which does not exist yet.

License

MIT