Replies: 1 comment 4 replies
-
Hi @bozho. Thanks for opening this discussion and trying out NGINX Gateway Fabric! Ok, so I've done some testing locally and have come up with a couple options for you. First up, here's a very basic example of how you can expose the path
If the default behavior does not suite your needs, and you need to change the Location and Refresh response headers, you have a couple choices.
You can set the Location and Refresh response headers by adding the ResponseHeaderModifier filter to your routing rule. This would change the HTTPRoute shown above to:
However, this approach isn't very flexible because we don't currently support NGINX variables in the header values. So you can't do something like:
and you also can't specify the
SnippetsFilters are a new feature that will be released in 1.5, which is scheduled to be released tomorrow. SnippetsFilters are a custom filter that allow you to inject NGINX configuration into various contexts in NGINX. Here's what this would look like for your use case:
If you want to try out SnippetsFilters today (before they are released tomorrow), you can deploy the Hope this helps, and let us know if you run into issues with either approach. |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I'm pretty sure this is possible, but being still new with k8s and gateway API (I'm playing with Nginx Gateway Fabric).
We have backend services and we want to use reverse proxy to expose them on a path (e.g. the API service on
http://www.example.com/api/
). In order to properly set the responseLocation
andRefresh
headers, if we were configuring "regular" Nginx server, we'd have something like this in the configuration:My question is essentially: how do I replicate
proxy_redirect
when using Gateway API?Beta Was this translation helpful? Give feedback.
All reactions