#47891·envoy

Allow route-scoped error redirects to forward original request and route context

Author: simhnnaCreated Sep 30, 2026Updated Sep 30, 2026
Labelsenhancementtriage

Title: Allow route-scoped error redirects to forward original request and route context

Use case

I use BackendTrafficPolicy.responseOverride with source: Local to send Envoy-generated 502/503/504 responses to an internal error-page service. Fixed redirect paths such as /_error-pages/503 let that service identify the error code, while upstream-generated error responses remain untouched.

The error page also needs context from the original request, especially its path and/or the HTTPRoute that matched it. A route-level RequestHeaderModifier where I copy relevant values into headers sent upstream would work, but I'd need to duplicate lots of configuration and it looks like evoy shortcircuits if there are no ready endpoints and returns a 503 immediately.

Request

Could responseOverride support opt-in request headers on an internal redirect, evaluated against the original request, matched route, and local response before rerouting to the error-page service? For example, the policy could forward the original path, status, HTTPRoute name, and namespace without requiring a Gateway-wide setting.

If accepted I'd be willing to work on it myself (but I'd very likely need some guidance...)