feat(gateway): 引入网管可以跳转其它网站
This commit is contained in:
parent
f4c6b38175
commit
a66ce7abbf
|
@ -2,11 +2,27 @@ spring:
|
|||
cloud:
|
||||
gateway:
|
||||
routes:
|
||||
- id: service-baidu
|
||||
uri: https://www.baidu.com
|
||||
predicates:
|
||||
- name: Path
|
||||
args:
|
||||
patterns: /s
|
||||
- name: Query
|
||||
args:
|
||||
param: wd
|
||||
regexp: .*
|
||||
|
||||
- id: service-cloud1
|
||||
uri: lb://service-cloud1
|
||||
predicates:
|
||||
- Path=/api/**
|
||||
- name: Path
|
||||
args:
|
||||
patterns: /api/**
|
||||
matchTrailingSlash: true
|
||||
order: 1
|
||||
|
||||
- id: service-cloud2
|
||||
uri: lb://service-cloud2
|
||||
uri: lb://service-cloud2 # 使用负载均衡代理请求
|
||||
predicates:
|
||||
- Path=/api/**
|
||||
- Path=/api/** # 匹配规则,开头/api/**
|
Loading…
Reference in New Issue