I have the following configuration of service with route in Kong:
- name: test
host: test-service
port: 80
protocol: http
path: /endpoint/
routes:
- name: test_route
strip_path: true
preserve_host: true
paths:
- /login
I am trying to understand the following behaviour:
- when I access
http://localhost/login
, I will end up with thehttp://localhost/endpoint
in my browser - however, when I try to access
http://localhost/login/test/page
, nothing will change and I am still in my browser onhttp://localhost/login/test/page
and the upstream server served my request properly
My expectation was that using http://localhost/login/test/page
, my browser will have eventually http://localhost/endpoint/test/page
. Apparently I misunderstood it.
I understood that in this case, Kong will use the upstream path as /endpoint/test/page
, because I have strip_path: true
.
However, how it can be changed in case I want to end up with http://localhost/endpoint/test/page
in case I will access http://localhost/login/test/page
in my browser?