A simple http server to bypass CORS origin request
Features:
- all http methods are supported
- forwards:
- query parameters
- headers
- body
- follows 3xx http redirects *
- rs/zerolog for logging
- rs/cors for handling cors
The app is deployed to heroku
let resp = await fetch('https://cors-proxy-io.herokuapp.com/google.com');
// or, if the application is running locally
let resp = await fetch('http://localhost:3228/google.com');
or open https://cors-proxy-io.herokuapp.com/google.com in your web browser
-p string
server port (default "3228")
-pp
enable pretty print
go run .
# or with flags
go run . -pp -p 8080
To build the image locally:
make docker-build
To run it locally:
make docker-run
# or, if you want to set the flags yourself
docker run -p 1337:1337 bypass-cors -p 1337 -pp
* These 3xx codes are followd:
- 301 (Moved Permanently)
- 302 (Found)
- 303 (See Other)
- 307 (Temporary Redirect)
- 308 (Permanent Redirect)