【Zuul】使用学习

【Zuul】使用学习

添加依赖

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-netflix-zuul</artifactId>
</dependency>

启用zuul

@EnableZuulProxy

忽略自动生成的路由

zuul:
  ignoredServices: '*'

敏感头

敏感头是一个黑名单,默认值不为空,因此想让zuul发送所有的头信息(除了忽略的那些),你必须将其显式的设置为空列表,下面展示了如何使用sensitiveHeaders

zuul
  sensitive-headers: 

猜你喜欢

转载自www.cnblogs.com/yangchongxing/p/11396004.html