springcloud的gateway去掉请求地址的前缀后再转发到相应的服务
答
spring:
application:
name: gateway
cloud:
gateway:
discovery:
locator:
enabled: true
routes:
#服务id
- id: common-bx-auth
#访问服务
uri: lb://common-bx-auth
predicates:
#访问地址
- Path=/auth/**
#去掉/auth后再转发请求到相应的服务
filters:
- StripPrefix=1
- AddResponseHeader=X-Response-Default-Foo, Default-Bar