0
votes

I'm looking for a way to forward the client requested URL to Kong API gateway to my API micro-services. For example if I have my kongw.com pointing to my Kong Gateway I want to forward the whole domain to my micro-service.

Another example:

The client is requesting mysubdomain.kongw.com/orders/list. I want my micro-service to know whole URL that is requested.

I found out that I can configure Nginx to get the URL using its server_name wildcards. but the wildcards returned nothing. I wanted to send the result to my micro-service by adding X-Wholerequest parameter to the request. but it didn't work.

what is the right way to configure Nginx to do this ? is there any other way to handle this situation in Kong ?

1

1 Answers

0
votes

The feature you describe, in which Kong captures the full URL of the request, then adds that URL as a request header as the request is proxied upstream, is supported by the Kong Enterprise Edition Request Transformer plugin https://getkong.org/plugins/ee-request-transformer/ - which is included with a paid subscription to Mashape Enterprise.

It might also be possible to do this with custom NGINX configuration, but I'm unfamiliar with how to do so.