{"id":16878869,"url":"https://github.com/peterj/simpleserver","last_synced_at":"2026-04-12T20:42:23.550Z","repository":{"id":235927099,"uuid":"753842840","full_name":"peterj/simpleserver","owner":"peterj","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-06T22:22:28.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-25T04:43:34.704Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peterj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-02-06T22:22:15.000Z","updated_at":"2024-02-06T22:22:33.000Z","dependencies_parsed_at":"2024-04-25T00:58:39.794Z","dependency_job_id":"e25f738d-4f27-439f-86da-01268dfe52f2","html_url":"https://github.com/peterj/simpleserver","commit_stats":null,"previous_names":["peterj/simpleserver"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterj%2Fsimpleserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterj%2Fsimpleserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterj%2Fsimpleserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterj%2Fsimpleserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterj","download_url":"https://codeload.github.com/peterj/simpleserver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244511336,"owners_count":20464294,"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":[],"created_at":"2024-10-13T15:51:53.763Z","updated_at":"2026-04-12T20:42:18.512Z","avatar_url":"https://github.com/peterj.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# How to preserve case of header names in Envoy?\n\n- [Background on the header casing options in Envoy](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_conn_man/header_casing)\n\n\nNote that using httpbin or other tools to test the headers will not work as expected, as they will normalize the headers to lowercase.\n\n## Building the test application\n\nThe `simpleserver` is Python server, listening on port 8080 and when called, returns the list of headers it received, without any normalization.\n\nAfter you've forked the repository, you can build the image using the provided `Dockerfile`:\n\n```shell\ndocker build -t simpleserver:0.1.0 .\n```\n\n## Running in Kubernetes\n\nThis example assumes you had kind cluster with Istio installed. You'll be using `sleep` deployment as the client and `simpleserver` as the server.\n\n\n```shell\n# Load the image to the kind cluster\nkind load docker-image simpleserver:0.1.0\n```\n\nDeploy the `simpleserver`:\n\n```shell\nkubectl apply -f simpleserver.yaml\n```\n\n## Testing \n\n1. Test the header casing without the Envoy filter:\n\n```shell\nkubectl exec -it deploy/sleep -- curl -H \"helloWorld: 123\" simpleserver:8080\n```\n\n2. Check the logs of the `simpleserver`:\n\n```shell\nkubectl logs deploy/simpleserver\n```\n\n```console\n--------HEADERS--------\nhost: simpleserver:8080\nuser-agent: curl/8.6.0\naccept: */*\nhelloworld: 123\nx-forwarded-proto: http\nx-request-id: 874f6526-ed5a-95bb-9d7d-0c12be213e73\nx-envoy-attempt-count: 1\nx-forwarded-client-cert: By=spiffe://cluster.local/ns/default/sa/default;Hash=6a6d95d31f856f191364f585966b64c58116e4e78a9e4eb01283a98f40423199;Subject=\"\";URI=spiffe://cluster.local/ns/default/sa/sleep\nx-b3-traceid: c9da4c8c3f050819f1a594ecb6dc1aa7\nx-b3-spanid: 9c29316b41195aba\nx-b3-parentspanid: f1a594ecb6dc1aa7\nx-b3-sampled: 1\n-----------------------\n```\n\nNotice the `helloworld` header is normalized (all lower-case).\n\n\n3. Deploy the Envoy filter:\n\n```shell\nkubectl apply -f envoyfilter.yaml\n```\n\n4. Repeat the same request as before:\n\n\n```shell\nkubectl logs deploy/simpleserver\n```\n\n```console\n--------HEADERS--------\nHost: simpleserver:8080\nUser-Agent: curl/8.6.0\nAccept: */*\nhelloWorld: 123\nx-forwarded-proto: http\nx-request-id: 94d6e011-df75-9465-bfee-aa7412945d81\nx-envoy-attempt-count: 1\nx-forwarded-client-cert: By=spiffe://cluster.local/ns/default/sa/default;Hash=6a6d95d31f856f191364f585966b64c58116e4e78a9e4eb01283a98f40423199;Subject=\"\";URI=spiffe://cluster.local/ns/default/sa/sleep\nx-b3-traceid: 46d42cc4d99c7966a77a0ab07c77f4a8\nx-b3-spanid: a3cfe566ed75a955\nx-b3-parentspanid: a77a0ab07c77f4a8\nx-b3-sampled: 1\n-----------------------\n```\n\nNotice this time the `helloWorld` header is preserved as it was sent by the client.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterj%2Fsimpleserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterj%2Fsimpleserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterj%2Fsimpleserver/lists"}