-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[request]: Host / Path rewrite #73
Comments
Any news on this feature? |
At Virtual Gateway, we currently do auto rewrites where we rewrite hostname to the destination Virtual Service name and the matched path to “/”. But we must enable customers to configure rewriting hostname/path both in Virtual Node and Virtual Gateway. |
is there a way to disable the auto rewrite? we're counting on the host in our backend logic for several purposes. @rajal-amzn |
@rabanian Unfortunately, the answer is no currently. We are working on a change to disable/make this configurable at the Virtual Gateway. So, please follow this thread for more updates on this. |
@rajal-amzn can I somehow get to the point when I can restore the original host through other headers? Maybe the ALB can add a duplicate of the host in a different name? Or in another tricky way? We're trying to find an alternative to waiting for this feature to be released and would appreciate any tip. Thanks |
@rabanian The current behavior at Virtual Gateway doesnt add the original host to any headers. But we should be able to add it. Could you explain your usecase on how you are planning to use the original host received at the Virtual Gateway? That way, we can make sure we handle your usecase. |
@rajal-amzn
|
Hey all, Changes to Gateway route
Changes to Route In addition, we are also adding capabilities in Route to match on additional parameters. Note that we are not adding support for rewrite behavior in Routes. Since routing rules are applied at both Virtual Gateway and at Virtual Service, enabling rewrites in both would lead to unintended rewrites happening one on top of the other. If you have a usecase where you would want to apply rewrite rules specifically at Virtual Service, please leave us feedback.
API Model
Following represents the updated API model for GRPC Gateway Routes.
Following represents the updated API model for HTTP Routes. HTTP2 Routes would follow similar model changes.
No changes to the GRPC route. Examples Following example shows how to disable hostname rewrites in Virtual Gateway
Following example shows how to change the request from
Following example shows how to change the request from
Following example shows how to change the request from
Following example shows how to change the request from
We hope these changes fit your use cases. We'll be updating this issue once we have the feature enabled in our Preview Channel. Until then, we'd love to hear your feedback on this proposal in the comments. |
Hi folks, We're currently blocked by lack of rewrite capability whilst ingressing traffic in to the mesh. We'd like something which would use regexp capture groups to do rewrites. Our use case is as follows:
Having read through the proposal comment above I'm not 100% clear on whether my use case would be supported here. Would I need to use a Most grateful if someone could shed some light on this 🙏 . |
@eddgrant The above proposal would not allow supporting capture groups for hostname and use that in rewrite. Would like to understand whether the final hostname in this case |
Hi everyone, Host / Path Rewriting support is now available in the App Mesh Preview Channel. Feel free to try out the example from our examples repository: howto-match-and-rewrite-at-ingress. |
Hey all, NOTE: Cloudformation support for this is yet to be launched. We will update this issue once it is done. |
Cloudformation support are live now. Resolving this issue now. |
Tell us about your request
Allow host / path rewrite
https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/route/route.proto#envoy-api-field-route-redirectaction-prefix-rewrite
https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/route/route.proto#envoy-api-field-route-routeaction-host-rewrite
https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/route/route.proto#envoy-api-field-route-routeaction-auto-host-rewrite
Which integration(s) is this request for?
I'm using ECS / with(out) Fargate / Service Discovery. But I don't think it matters here.
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
Host rewrite: We want to forward virtual service traffic website.com/feeds -> xmlfeed.com/feeds
xmlfeed.com itself only respond on the specific hostname.
Path rewrite: We want to forward, in a router:
website.com/sitemap.xml -> xmlfeed.com/feeds/sitemap
Are you currently working around this issue?
We are using nginx ingress to rewrite the rule. However, it's very clunky as it requires us to redeploy the config in nginx in tandem with the app mesh changes.
Additional context
Attachments
The text was updated successfully, but these errors were encountered: