配置Zuul代理下游的认证 - wzz-code/cloud-security-sample GitHub Wiki
您可以通过 proxy.auth.*
设置来控制 @EnableZuulProxy
下游的授权行为。例:
application.yml
proxy:
auth:
routes:
customers: oauth2
stores: passthru
recommendations: none
在这个例子中,“customers”服务获得一个OAuth2令牌中继,“stores”服务得到一个传递(授权头只是通过下游),“recommendations”服务的授权标题已被删除。如果有令牌可用,则默认行为是执行令牌中继,否则为passthru。