repositorypackage
0.0.0-20240619135357-e80cf5c80691
Repository: https://github.com/thodde/go-reverse-proxy.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# README
go-reverse-proxy
To build and run the project:
go build
./go-reverse-proxy
I also included a small go program which starts two backend servers (from a corresponding config file):
cd backend_servers/
go build start_backend.go
./start_backend
Here is a list of curl commands for testing the reverse proxy:
- Valid token request:
curl -H "X-Auth-Token: valid-token-1" http://localhost:8080/some/path
- Invalid token request:
curl -H "X-Auth-Token: invalid-token" http://localhost:8080/some/path
- No token:
curl http://localhost:8080/some/path
- Websocket request with a valid token:
websocat -H="X-Auth-Token: valid-token-1" ws://localhost:8080/ws
- Websocket request with an invalid token:
websocat -H="X-Auth-Token: invalid-token" ws://localhost:8080/ws
- Websocket request with no token:
websocat ws://localhost:8080/ws