mall-cloud/mall-gateway/src/main/resources/application-routes.yaml

38 lines
1009 B
YAML

spring:
cloud:
gateway:
# 全局跨域
globalcors:
cors-configurations:
'[/**]':
allowed-headers:
- "*"
allowed-origin-patterns:
- "*"
allowed-methods:
- "*"
allow-credentials: true
routes:
- id: route-product
uri: lb://service-product
predicates:
- Path=/api/product/**
filters:
# - RewritePath=/api/(?<segment>.*),/xxx/$\{segment}
- id: route-order
uri: lb://service-order
predicates:
- Path=/api/order/**
- id: route-member
uri: lb://service-member
predicates:
- Path=/api/member/**
- id: route-coupon
uri: lb://service-coupon
predicates:
- Path=/api/coupon/**
- id: route-third-party
uri: lb://service-third-party
predicates:
- Path=/api/third-party/**