{"id":24841785,"url":"https://github.com/jamesorlakin/simple-http-echo","last_synced_at":"2025-03-26T06:13:19.592Z","repository":{"id":83353953,"uuid":"570841309","full_name":"jamesorlakin/simple-http-echo","owner":"jamesorlakin","description":"A simple wildcard HTTP app to return headers and paths for reverse proxy debugging","archived":false,"fork":false,"pushed_at":"2023-10-15T17:25:27.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-31T07:33:09.723Z","etag":null,"topics":["debug","hacktoberfest","http","proxy"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jamesorlakin.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2022-11-26T09:57:52.000Z","updated_at":"2023-01-08T19:10:03.000Z","dependencies_parsed_at":"2024-06-19T16:21:07.018Z","dependency_job_id":"bf2627d5-38aa-402c-8c6c-79a8c3ce0d2e","html_url":"https://github.com/jamesorlakin/simple-http-echo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesorlakin%2Fsimple-http-echo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesorlakin%2Fsimple-http-echo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesorlakin%2Fsimple-http-echo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesorlakin%2Fsimple-http-echo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamesorlakin","download_url":"https://codeload.github.com/jamesorlakin/simple-http-echo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245598316,"owners_count":20641884,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["debug","hacktoberfest","http","proxy"],"created_at":"2025-01-31T07:28:38.914Z","updated_at":"2025-03-26T06:13:19.575Z","avatar_url":"https://github.com/jamesorlakin.png","language":"Go","readme":"# Simple HTTP Echo\n\nThis is the world's simplest project - a small HTTP server that returns a dump of the HTTP request metadata passed to it with a status of 200.\nSimilar to the 'anything' endpoint of [httpbin](https://httpbin.org/) but works for all paths. It'll log requests too.\n\n## Why?\n\nI've found myself in multiple situations having to debug reverse proxies, including AWS ALB rules, AWS API Gateway headers, Kubernetes Ingress path matching, and Nginx `proxy_pass` with a URL defined from a variable (fun fact, in that situation Nginx will stop caching DNS, but `proxy_pass` becomes literal so you need to add regex matching to the `location` block *and* add remember to add query path values back - that was fun to investigate...).\nI've also had proxies swallow `X-Forwarded-*` headers due to misconfigured middleware - this was the final straw to whip up this small utility.\n\n## Usage\n\nSimple HTTP echo is a simple Go binary with only one option: the `PORT` environment variable (which defaults to 3000 if not set).\n\nThere's a container image for ease of use with Docker or Kubernetes: [`jamesorlakin/simple-http-echo:latest`](https://hub.docker.com/r/jamesorlakin/simple-http-echo).\n\n### Response Example\n\n```\ncurl --verbose -H \"X-Forwarded-Proto: some-test-header\" http://localhost:3000/any-path-can-go-here\n*   Trying 127.0.0.1:3000...\n* TCP_NODELAY set\n* Connected to localhost (127.0.0.1) port 3000 (#0)\n\u003e GET /any-path-can-go-here HTTP/1.1\n\u003e Host: localhost:3000\n\u003e User-Agent: curl/7.68.0\n\u003e Accept: */*\n\u003e X-Forwarded-Proto: some-test-header\n\u003e \n* Mark bundle as not supporting multiuse\n\u003c HTTP/1.1 200 OK\n\u003c Date: Sat, 26 Nov 2022 10:13:04 GMT\n\u003c Content-Length: 528\n\u003c Content-Type: text/plain; charset=utf-8\n\u003c \n{\n        \"Method\": \"GET\",\n        \"URL\": {\n                \"Scheme\": \"\",\n                \"Opaque\": \"\",\n                \"User\": null,\n                \"Host\": \"\",\n                \"Path\": \"/any-path-can-go-here\",\n                \"RawPath\": \"\",\n                \"OmitHost\": false,\n                \"ForceQuery\": false,\n                \"RawQuery\": \"\",\n                \"Fragment\": \"\",\n                \"RawFragment\": \"\"\n        },\n        \"Proto\": \"HTTP/1.1\",\n        \"Header\": {\n                \"Accept\": [\n                        \"*/*\"\n                ],\n                \"User-Agent\": [\n                        \"curl/7.68.0\"\n                ],\n                \"X-Forwarded-Proto\": [\n                        \"some-test-header\"\n                ]\n        },\n        \"ContentLength\": 0,\n        \"Host\": \"localhost:3000\",\n        \"RemoteAddr\": \"127.0.0.1:38782\",\n        \"RequestURI\": \"/any-path-can-go-here\"\n* Connection #0 to host localhost left intact\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesorlakin%2Fsimple-http-echo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamesorlakin%2Fsimple-http-echo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesorlakin%2Fsimple-http-echo/lists"}