{"id":16538087,"url":"https://github.com/jamesmcroft/traefik-plugin-rewrite-response-headers","last_synced_at":"2026-04-22T03:33:24.324Z","repository":{"id":221990710,"uuid":"755948818","full_name":"jamesmcroft/traefik-plugin-rewrite-response-headers","owner":"jamesmcroft","description":"Rewrite response headers is a middleware plugin for Traefik which rewrites the HTTP response headers by replacing a search regex by a replacement string","archived":false,"fork":false,"pushed_at":"2024-02-11T17:51:39.000Z","size":13,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-06T05:22:42.333Z","etag":null,"topics":["traefik","traefik-plugin"],"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/jamesmcroft.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":"2024-02-11T14:59:56.000Z","updated_at":"2025-10-09T15:32:10.000Z","dependencies_parsed_at":"2024-06-21T14:11:52.656Z","dependency_job_id":null,"html_url":"https://github.com/jamesmcroft/traefik-plugin-rewrite-response-headers","commit_stats":null,"previous_names":["jamesmcroft/traefik-plugin-rewrite-response-headers"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/jamesmcroft/traefik-plugin-rewrite-response-headers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesmcroft%2Ftraefik-plugin-rewrite-response-headers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesmcroft%2Ftraefik-plugin-rewrite-response-headers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesmcroft%2Ftraefik-plugin-rewrite-response-headers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesmcroft%2Ftraefik-plugin-rewrite-response-headers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamesmcroft","download_url":"https://codeload.github.com/jamesmcroft/traefik-plugin-rewrite-response-headers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesmcroft%2Ftraefik-plugin-rewrite-response-headers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32119919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T00:31:26.853Z","status":"online","status_checked_at":"2026-04-22T02:00:05.693Z","response_time":58,"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":["traefik","traefik-plugin"],"created_at":"2024-10-11T18:44:23.975Z","updated_at":"2026-04-22T03:33:24.307Z","avatar_url":"https://github.com/jamesmcroft.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rewrite Response Headers\n\nRewrite response headers is a middleware plugin for Traefik which rewrites the HTTP response headers by replacing a search regex by a replacement string.\n\n## Configuration\n\n### Static\n\n```yaml\npilot:\n  token: \"xxxx\"\n\nexperimental:\n  plugins:\n    rewriteResponseHeaders:\n      moduleName: github.com/jamesmcroft/traefik-plugin-rewrite-response-headers\n      version: \"v1.0.0\"\n```\n\n### Dynamic\n\nTo configure the Rewrite Response Headers plugin you should create a [middleware](https://docs.traefik.io/middlewares/overview/) in your dynamic configuration as explained [here](https://doc.traefik.io/traefik/middlewares/overview/). The following example creates and uses the `rewriteResponseHeaders` middleware plugin to replace a custom `Operation-Location` header which provides a `http://` URL with a `https://` URL.\n\n```yaml\nhttp:\n  services:\n    serviceRoot:\n      loadBalancer:\n        servers:\n          - url: \"http://localhost:8080\"\n\n  middlewares:\n    rewrite-operation-location-header:\n      plugin:\n        rewriteResponseHeaders:\n          rewrites:\n            - header: \"Operation-Location\"\n              regex: \"^http://(.+?)/(.+)$\"\n              replacement: \"https://{RequestHost}/$2\"\n\n  routers:\n    routerRoot:\n      rule: \"PathPrefix(`/`)\"\n      service: \"serviceRoot\"\n      middlewares:\n        - \"rewrite-operation-location-header\"\n```\n\n\u003e [!NOTE]\n\u003e This plugin includes a `{RequestHost}` token which can be used in the `replacement` string to include the original request host in the replaced header value. **It is not required to use this token**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesmcroft%2Ftraefik-plugin-rewrite-response-headers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamesmcroft%2Ftraefik-plugin-rewrite-response-headers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesmcroft%2Ftraefik-plugin-rewrite-response-headers/lists"}