Describe the bug
RewritePath seems not respecting the route URI, for instance:
spring:
cloud:
gateway:
mvc:
routes:
- id: base
uri: https://google.com
predicates:
- Path=/other/**
filters:
- RewritePath=/other/?(?<segment>.*), /base/$\{segment}
There, the expectation will be:
- Calls to
http://localhost:8080/other/transcoder/v1/break
- Rewrite path to
http://localhost:8080/base/transcoder/v1/break
- Change URI base to
https://google.com/base/transcoder/v1/break
The third point is not happening, and the gateway calls localhost.
Sample
The following is a sample where you can find a test GatewayissueApplicationTests that passes in green, which shouldn't, as calling https://google.com/base/transcoder/v1/break must fail
Describe the bug
RewritePath seems not respecting the route URI, for instance:
There, the expectation will be:
http://localhost:8080/other/transcoder/v1/breakhttp://localhost:8080/base/transcoder/v1/breakhttps://google.com/base/transcoder/v1/breakThe third point is not happening, and the gateway calls localhost.
Sample
The following is a sample where you can find a test GatewayissueApplicationTests that passes in green, which shouldn't, as calling
https://google.com/base/transcoder/v1/breakmust fail