
Request Header Modifier
Request Header Modifier filters let you modify headers that flow through the gateway. Typical operations:- Add new headers.
- Set (overwrite) a header to a specific value.
- Append values to an existing header.
- Remove headers entirely.
Use header modifiers to centralize cross-cutting concerns like tracing, authentication hints, or policy flags so backends remain simple and consistent.
Request Redirect
A Request Redirect filter instructs the client to request a different URL by returning an HTTP 3xx response (for example, 301 or 302) and a Location header that points to the new endpoint. Common uses:- Canonicalization (for example, redirect
http://tohttps://). - Moving clients to new hostnames or paths.
- Enforcing trailing slash behavior or legacy URL compatibility.
URL Rewrite
URL Rewrite modifies the request URL (path and optionally other URL parts) before sending the request to the backend. This is useful when you want a friendly external path but route to a different internal path or microservice endpoint. Key points:- Rewrites affect what the backend sees as the request path; the client’s browser still shows the original requested URL.
- You can preserve or modify query strings and headers depending on the gateway/filter configuration.
/coffee forwarded internally to /tea:

Request Mirror (Shadowing)
Request Mirror duplicates an incoming request and forwards a copy to one or more additional backends while allowing the primary backend to handle the real response returned to the client. The mirrored request is usually fire-and-forget — the gateway ignores the mirrored backend’s response. Use cases:- Validate a new service version with production traffic without impacting users.
- Feed production traffic into analytics or observability pipelines.
- Performance/load testing with real request shapes.
Mirrored requests are often sent asynchronously and their responses ignored. Be mindful of privacy and downstream side effects (e.g., duplicated writes). Ensure mirrored endpoints are safe to receive production traffic.

Best practices
- Centralize header manipulation at the gateway to avoid duplication in services.
- Use redirects for canonicalization to improve SEO and avoid duplicate-content issues.
- Prefer URL rewrites for internal routing when you want to keep stable public URLs.
- Mirror only safe, idempotent requests or routes that you know will not cause side effects when duplicated.
- Monitor mirrored traffic volume and latency to avoid unexpected load on shadow services.
- Gateway API Specification
- NGINX Fabric Gateway documentation
- Consider related topics: routing, rate limiting, and observability for production deployments.