Replies: 1 comment 2 replies
-
|
for context, from envoy docs:
If you need more flexibility than what envoy offers, I think you can achieve part of this today with existing head modification filter in the HTTPRoute. suggestion for headers to add:
(havn't tested these ones specifically - i think it's worth a try as these should work today) see this for more info on the formatters: https://github.com/envoyproxy/envoy/blob/2546bcd78a06fce31a77f90badd2f33878aa36c0/docs/root/configuration/observability/access_log/usage.rst |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
A follow-up to the discussing during today's community meeting and the features (gaps) collection in #12910, I'd like to seed the idea of having support for the proxy headers.
A very basic use-case:
If
HTTPRouteconfigures path-based routing for a service onexample.comhost and/myapppath, then request atGET https://example.com/myapp/xyz/echocould reach the backend service as/xyz/echobut with the following headers set by the proxy (gateway):that is both, de-facto standard and non-standard headers.
It is not uncommon that backend services hosted behind proxy servers rely on those headers e.g. ASP.NET Core apps. As a user of Kong Gateway / Ingress Controller, which supports X-Forwarded-Prefix, Kong/kong#5620, I've taken care to teach my apps to rely those headers.
Second, but also important feature is easy way to enable stripping of prefix from the original request when forwarding request to backend service like the Kong option strip_path. That is, to ensure path part used by gateway routing is stripped from the request forwarded to the target service.
However, that seems to be already feasible with
URLRewrite, for example (warning: Gateway API rookie here):Perhaps this idea is sensible for kgateway too, despite that majority of the
X-Forwarded-*are non-standard HTTP headers.Beta Was this translation helpful? Give feedback.
All reactions