是否可以从 Zuul 路由中排除路径或匹配器?
目标是
- 所有请求/合同/**被路由到Contract.example.com
- 所有请求/审计/**被路由到审计.example.com
- 所有请求/心跳/** or /sso/**直接从 zuul 提供服务。
- 所有其他请求(/**) 被路由到html.example.com
我有这样的配置:
zuul:
routes:
contract:
path: /contracts/**
url: http://contracts.example.com:8080/api
audit:
path: /audits/**
url: http://audit.example.com:8080
html:
path: /**
url: http://html.example.com:80
现在的问题是如何定义/心跳 and /sso没有被路由到html.example.com由祖尔?
我正在使用 Spring Boot 及其自动配置。
有一个配置属性称为忽略模式。这样就可以定义匹配器以从路由中排除路由。
zuul:
ignoredPatterns:
- /heartbeat/**
- /sso/**
routes:
contract:
path: /contracts/**
url: http://contracts.example.com:8080/api
audit:
path: /audits/**
url: http://audit.example.com:8080
html:
path: /**
url: http://html.example.com:80
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)