Analysis updated 2026-07-08 · repo last pushed 2025-06-18
Swap an old brand name across multiple backend services without redeploying them.
Rewrite embedded URLs during a domain migration on the fly.
Update a copyright year or fix a typo in responses without touching the original app.
Insert dynamic values like the current hostname or client IP into responses.
| caddyserver/replace-response | vadimsemenykv/saboteur | imshire/xu-shop | |
|---|---|---|---|
| Stars | 156 | 157 | 140 |
| Language | Go | Go | Go |
| Last pushed | 2025-06-18 | — | — |
| Maintenance | Stale | — | — |
| Setup difficulty | moderate | easy | hard |
| Complexity | 2/5 | 3/5 | 4/5 |
| Audience | ops devops | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires building Caddy with the module using xcaddy and disabling backend compression for the module to work.
The replace_response module for Caddy lets you automatically find and swap text in web pages or API responses as they pass through your server. Imagine you want to change a brand name everywhere it appears, update a copyright year, or fix a typo without touching the original backend application, this tool handles that on the fly. Caddy is a web server that sits between users and your applications. Normally it just forwards requests and responses, but with this module added, it intercepts outgoing responses and performs text substitutions before they reach the user. You can do simple find-and-replace operations or use more powerful pattern matching. You can also target specific types of responses, like only modifying JSON data or only HTML pages. This is useful for anyone running Caddy as a reverse proxy. A company rebranding might need to swap an old product name across multiple backend services without redeploying them. Someone migrating domains could rewrite embedded URLs on the fly. You can also use Caddy's built-in variables to dynamically insert things like the current hostname or client IP into responses. The module offers two operating modes. By default it buffers the entire response first, which is less memory-efficient but ensures the response size metadata stays accurate. Alternatively, streaming mode processes data as it flows through, which is faster but may drop that size information since the final length is unknown ahead of time. There are some limitations worth noting. It cannot modify compressed content directly, you need to tell the backend not to compress responses first. Additionally, pattern matches longer than 2 kilobytes will be skipped. These constraints matter when deciding whether this approach fits your use case.
A Caddy module that finds and replaces text in web pages or API responses as they pass through your server, without touching the original backend application.
Mainly Go. The stack also includes Go, Caddy.
Stale — no commits in 1-2 years (last push 2025-06-18).
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly ops devops.
This repo across BitVibe Labs
Verify against the repo before relying on details.