Http Sneak is a lightweight Go HTTP server that accepts any request and returns a 200 code with all the request path, parameters and headers pretty printed.
Useful for debugging Proxies, Api Gateways, etc.
Compile and run the server locally (it requires Go >= 1.14 installed):
- Run:
make run
- Send a request
$ curl localhost:8080/test
Path: /test
Headers:
User-Agent: [curl/7.70.0]
Accept: [*/*]
Manifests for Pod and Service are provided. The http-sneak
image is hosted in dockerhub for simplicity.
- Apply the
http-sneak.yaml
manifests:kubectl apply -f http-sneak.yaml
Additionally, if you are using an Ingress Controller, an ingress resource is provided to access the http-sneak
pod. Apply it by running:
kubectl apply -f http-sneak-ingress.yaml
This will create an ingress rule for the host "example.com" and path /http-sneak
. Simply use curl to access the pod (Note: $IP is your Ingress Controller pod)
$ curl -H "Host: example.com" http://<$IP>:80/http-sneak
MIT