Strip_Path isn't working for Kong 2.5.0

Hi All,

I have different set of microservices which have swagger at endpoint “/swagger”.

service 1 has /swagger endpoint
service 2 has /swagger endpoint

Currently, what I have implemented is this:

service name: abc-svc
service path: /
route name: abc-route
route path: /service1
strip_path: true

service name: xyz-svc
service path: /
route name: xyz-route
route path: /service2
strip_path: true

Expected:
When someone visits
url/service1/swagger, he should be redirected towards swagger page of service1

Actual:
The strip_path is not being effective and I land up with url not being found as the request is forwarded as a whole uri (url/service1/swagger) and not url/swagger to the respective backend service.

Can someone please let me know if this is a bug or are my configurations incorrect??

Can you please tell us what your environment is and how you created the service and route object?

For example,

What platform did you deploy Kong?

Is it DBless or with DB? How did you create service/route object?

If you are running on Kubernetes, did you use annotation or KongIngress CRD to set strip_path?

Do you have any other routes that might catch this request?

You can use kong-debug:1 header to see which service/route your request was match to.

The kong isn’t kubernetes based. It is simply deployed over on-premise ubuntu 18.04 server as well as the microservices. The interesting part is, if I add another path “/” to the path of route, it servers the swagger page of only that particular service while rest of the service give error.

Kong is configured for postgresql as a db.


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ