π Drop-in HTTP request reflector β see exactly what is hitting your service
# TL;DR π run the reflector on :8080
docker run --rm -p 8080:8080 ghcr.io/kloudkit/looking-glass:latestThen point anything at it β every method, every path is answered with the full request it received (method, URL, query, headers, client address, body).
The HTTP response is json by default and html on demand, selected by a
dedicated header so it never collides with the request's own Accept β or by a
?format= query param so it works straight from a browser address bar:
# JSON (default)
curl -X POST 'localhost:8080/api/users?page=2' -d '{"name":"ada"}'
# HTML via header
curl 'localhost:8080/api/users?page=2' -H 'X-Glass-Format: html'# HTML in a browser β just add ?format=html to the URL
http://localhost:8080/api/users?page=2&format=html
Meanwhile the container logs stay a concise, colored activity stream β one line per request (time, client, method, path, response format, body size), never the request contents:
docker logs -f <container>
# 2026/06/10 12:00:00 10.0.0.1:54321 POST /api/users?page=2 β json 14b- Wildcard everything β every HTTP method on every path returns
200with the full request reflected back. - Two response formats β
json(default) orhtml, chosen with theX-Glass-Formatheader (never the request'sAccept). - Colored activity log β stdout gets one readable line per request (time,
client, method, path, format, size), so
docker logsstays a clean access stream and request contents never leak into the logs. - Safe HTML β reflected values are escaped, so a malicious body can't execute in the browser; the logged path is stripped of control characters.
- Bounded β request bodies are capped (default
1 MiB) so a stray upload can't take the box down; truncation is shown in every rendering. - Tiny image β a single static Go binary on a shell-less, non-root distroless base.
| Variable | Default | Description |
|---|---|---|
PORT |
8080 |
Port to listen on. |
MAX_BODY_BYTES |
1048576 |
Max body bytes reflected before cut-off. |
| Selector | Values | Effect |
|---|---|---|
X-Glass-Format header |
json / html |
Response format. Takes precedence. |
?format= query param |
json / html |
Browser-friendly fallback. Defaults json. |
Run it straight from source while iterating locally:
go run .
# in another shell
curl -X DELETE 'localhost:8080/anything/here'Or build the image yourself:
docker build -t looking-glass .
docker run --rm -p 8080:8080 looking-glassπ‘ The final image is distroless and shell-less. Swap the final stage for
scratchto shave it further, or forghcr.io/kloudkit/base-imageif you want a shell to exec into.
Released under the MIT License