Add many routes to one service in Kong for different path in the service


#1

I’m use kong with services and route, need create one service with many routes, some route whith JWT and other not, thomthing similiar to the next table .

  | Route         | Route in service | Plugins JWT |
  |---------------|------------------|-------------|          
  |/service1      | /                | True        |  
  |/service1/url1 | /url1            | False       | 
  |/service1/url2 | /url2            | False       |  

But routes un Kong are very simple, i tried with the option “Strip Path” but send all route:

Without “Strip Path”
“/service1/url1=>/”

With “Strip Path”
“/service1/url1=>/service1/url1”

I Need
“/service1/url1=>/url1”

I only see one soliction, creat one “service” with one “route” for each my the paths and configure path in the service, ejample.

service1: { host:service1, path:null, route { paths:[/service1 ]}}
service2: { host:service1, path:/url1, route { paths:[/service1/url1 ]}}

But this solution not felling good.