Routing with Relative URI

Latest response

My client used our container platform for microgateway by SoftwareAG. There is a neccesity so that the base URI that passed into service is using relative URI.

Normally, it works like this:

things that added in routes:
https://microgateway-service-a.container.com
it might open:
[*] https://microgateway-service-a.container.com/rest/microgateway/status

but when we changed the routes into this:
https://microgateway.container.com/service-a

we can't open the similar [*] menu:
https://microgateway.container.com/service-a/rest/microgateway/status

"/rest/microgateway/status" is the built in rest api on microgateway platform. How should we configure so that service only recognize /rest/microgateway/status not the "service-a" from routing configuration. I thought initially, relative uri pass through the service will ignore the relative URI written in routing configuration.

Any kind advice from community, any help will be appreciated. thx

Responses

After looking for solution for a while, I found the way by using annotation (either on ingress or each route).

annotations: haproxy.router.openshift.io/rewrite-target: /

reference: https://access.redhat.com/solutions/5671021