0

I am using Kong API Gateway with pretty straightforward configuration.

I have two services registered, with / being public part of api and /admin/{resource_id} protected with oauth.

Second service is using following configuration, path here only:

routes:
  - name: admin_endpoint
    paths:
      - /admin/
    strip_path: false

Which works as expected for /admin/ path e.g. GET all resources. When I add a additional paths like below:

routes:
  - name: admin_endpoint
    paths:
      - /admin/?$
    strip_path: false

Request works and token is passed to upstream and I am able to GET single resource, but on GET /admin token is not passed to upstream. (I am able to verify via logs that requested are routed to service admin_endpoint although I have service registered with / which doesn't have oauth configured so requests are properly routed.)

Ingress is routed via / directly to Kong.

So conclusion is, either I have working configuration that works on root path /admin or admin/{id} but not both.

Anyone faced similar issue?

Alan Kis
  • 1,790
  • 4
  • 24
  • 47

0 Answers0