Intercept and modify API request (Kong API)

We have use case where we want to intercept kong api . Please find the use case details below.

Kong API : /service
Upstream Service: /upstreamService

In, some cases user will invoke / appName1/service in the browser and / appName2/service, but when it reaches to Kong, we want to strip app Name and invoke kong api /service which intern will forward the call to /upstreamService .

Kong Version: 2.0.4

Could you please help…

Ingress rules for /appName1/service and /appName2/service with strip_path set to true and Service path set to /upstreamService should handle this.

The complete path sent upstream is:

(Service path annotation, default="/") + (Ingress rule path, if strip_path=false) + (remaining path after the segment matched by your Ingress rule)

© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ