Use replacePath in ProxyExchangeHandlerFunction
@LFM Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
@LFM Thank you for signing the Contributor License Agreement!
Can you explain what this is trying to do?
Can you explain what this is trying to do?
Config example:
spring:
cloud:
gateway:
mvc:
routes:
- id: route1
uri:
http://localhost:1213
predicates:
- Path=/route1/**
- id: route2
uri:
http://localhost:1214/service
predicates:
- Path=/route2/**
- id: default
uri:
http://localhost:1214/service
predicates:
- Path=/**
My gateway port is 1212.
It was normal when I access 'http://localhost:1212/route1/xxx'. But when I access 'http://localhost:1212/default/xxx', the '/service' in the route's path is lost.
oh no I fixed the same issue in https://github.com/spring-cloud/spring-cloud-gateway/pull/3260 - there I did provide a small reproducer project and a differently worded explanation which illustrates the issue (hopefully) clearly
Closing in favor of #3293