{"id":50928772,"url":"https://github.com/kloudkit/looking-glass","last_synced_at":"2026-06-17T02:02:50.283Z","repository":{"id":363770960,"uuid":"1264821332","full_name":"kloudkit/looking-glass","owner":"kloudkit","description":"🔎 Drop-in HTTP request reflector — see exactly what is hitting your service","archived":false,"fork":false,"pushed_at":"2026-06-10T09:09:10.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-10T10:14:10.511Z","etag":null,"topics":["container","debugging-tool","echo-server","http-debugging"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kloudkit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-10T07:58:33.000Z","updated_at":"2026-06-10T09:09:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kloudkit/looking-glass","commit_stats":null,"previous_names":["kloudkit/looking-glass"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kloudkit/looking-glass","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kloudkit%2Flooking-glass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kloudkit%2Flooking-glass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kloudkit%2Flooking-glass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kloudkit%2Flooking-glass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kloudkit","download_url":"https://codeload.github.com/kloudkit/looking-glass/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kloudkit%2Flooking-glass/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34430688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["container","debugging-tool","echo-server","http-debugging"],"created_at":"2026-06-17T02:02:49.484Z","updated_at":"2026-06-17T02:02:50.273Z","avatar_url":"https://github.com/kloudkit.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kloud • Looking Glass\n\n\u003e 🔎 **Drop-in HTTP request reflector** — see *exactly* what is hitting your service\n\n[![Stars](https://img.shields.io/github/stars/kloudkit/looking-glass?style=for-the-badge\u0026logo=git\u0026logoColor=c6d0f5\u0026labelColor=414559\u0026color=f0c6c6)](https://github.com/kloudkit/looking-glass/stargazers)\n[![Docker](https://img.shields.io/badge/latest-a?style=for-the-badge\u0026logo=docker\u0026logoColor=c6d0f5\u0026label=docker\u0026labelColor=414559\u0026color=ef9f76)](https://github.com/kloudkit/looking-glass/pkgs/container/looking-glass)\n[![Build](https://img.shields.io/github/actions/workflow/status/kloudkit/looking-glass/build.yaml?style=for-the-badge\u0026logo=githubactions\u0026logoColor=c6d0f5\u0026label=build\u0026labelColor=414559\u0026color=a6da95)](https://github.com/kloudkit/looking-glass/actions/workflows/build.yaml)\n[![License](https://img.shields.io/github/license/kloudkit/looking-glass?style=for-the-badge\u0026logo=opensourceinitiative\u0026logoColor=c6d0f5\u0026labelColor=414559\u0026color=8caaee)](https://github.com/kloudkit/looking-glass/blob/main/LICENSE)\n\n---\n\n```sh\n# TL;DR  🔎 run the reflector on :8080\ndocker run --rm -p 8080:8080 ghcr.io/kloudkit/looking-glass:latest\n```\n\nThen point anything at it — every method, every path is answered with the full\nrequest it received (method, URL, query, headers, client address, body).\n\nThe **HTTP response** is `html` by default and `json` on demand, selected by a\ndedicated header so it never collides with the request's own `Accept` — or by a\n`?format=` query param so the JSON view is reachable straight from a browser\naddress bar:\n\n```sh\n# HTML (default)\ncurl 'localhost:8080/api/users?page=2'\n\n# JSON via header\ncurl -X POST 'localhost:8080/api/users?page=2' -d '{\"name\":\"ada\"}' -H 'X-Glass-Format: json'\n```\n\n```text\n# JSON in a browser — just add ?format=json to the URL\nhttp://localhost:8080/api/users?page=2\u0026format=json\n```\n\nThe HTML view also carries a **Copy as** control in the corner — grab the request\nas pretty `JSON` or as a `Raw` HTTP dump (request line, headers, body) without\nleaving the page.\n\nMeanwhile the **container logs stay a concise, colored activity stream** — one\nline per request (time, client, method, path, response format, body size), never\nthe request contents:\n\n```sh\ndocker logs -f \u003ccontainer\u003e\n# 2026/06/10 12:00:00 10.0.0.1:54321  POST  /api/users?page=2  →  html  14b\n```\n\n## What's Inside\n\n- **Wildcard everything** — every HTTP method on every path returns `200` with\n  the full request reflected back.\n- **Two response formats** — `html` (default) or `json`, chosen with the\n  `X-Glass-Format` header (never the request's `Accept`).\n- **Copy as** — the HTML view copies the request to your clipboard as pretty\n  `JSON` or a `Raw` HTTP dump, no devtools required.\n- **Colored activity log** — stdout gets one readable line per request (time,\n  client, method, path, format, size), so `docker logs` stays a clean access\n  stream and request contents never leak into the logs.\n- **Safe HTML** — reflected values are escaped, so a malicious body can't execute\n  in the browser; the logged path is stripped of control characters.\n- **Bounded** — request bodies are capped (default `1 MiB`) so a stray upload\n  can't take the box down; truncation is shown in every rendering.\n- **Tiny image** — a single static Go binary on a shell-less, non-root distroless\n  base.\n\n## Configuration\n\n| Variable         | Default   | Description                              |\n| ---------------- | --------- | ---------------------------------------- |\n| `PORT`           | `8080`    | Port to listen on.                       |\n| `MAX_BODY_BYTES` | `1048576` | Max body bytes reflected before cut-off. |\n\n| Selector                | Values          | Effect                                      |\n| ----------------------- | --------------- | ------------------------------------------- |\n| `X-Glass-Format` header | `html` / `json` | Response format. Takes precedence.          |\n| `?format=` query param  | `html` / `json` | Browser-friendly fallback. Defaults `html`. |\n\n## Getting Started\n\nRun it straight from source while iterating locally:\n\n```sh\ngo run .\n# in another shell\ncurl -X DELETE 'localhost:8080/anything/here'\n```\n\nOr build the image yourself:\n\n```sh\ndocker build -t looking-glass .\ndocker run --rm -p 8080:8080 looking-glass\n```\n\n\u003e 💡 The final image is [distroless](https://github.com/GoogleContainerTools/distroless)\n\u003e and shell-less. Swap the final stage for `scratch` to shave it further, or for\n\u003e `ghcr.io/kloudkit/base-image` if you want a shell to exec into.\n\n## License\n\nReleased under the [**MIT License**](https://github.com/kloudkit/looking-glass/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkloudkit%2Flooking-glass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkloudkit%2Flooking-glass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkloudkit%2Flooking-glass/lists"}