Spring云Brixton.RELEASEzuul
Spring Cloud Brixton.RELEASE zuul
我是 spring 云的新手,在我的项目(一个使用 spring 引导构建的微服务项目)中,我使用了 spring 云版本 Brixton.RC2,它运行良好.但是当我尝试将其版本升级到 Brixton.RELEASE 时,该项目无法与 zuul 一起使用(如果我直接访问 web 微服务,它可以工作,但是如果我通过 zuul 访问,它就不起作用),我没有更改配置中的任何内容。 Maven 依赖项是:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.5.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-parent</artifactId>
<version>Brixton.RC2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
谁能指出我的项目出了什么问题?
谢谢并致以最诚挚的问候!!
我也有同样的问题。我在 Brixton.M4 上并升级到 Brixton.Release 。发生的事情是,当您登录时,请求会到达网关并被路由到 ouath 服务器。但是当 zuul 路由登录请求时,header 丢失了。即缺少 clientId:clientSecret 的 base64 授权 header。这是因为 zuul 中的 Sensitive Headers,这是 Spring Cloud Netflix 1.1 中的新功能。详情请参考https://github.com/spring-cloud/spring-cloud-netflix/blob/master/docs/src/main/asciidoc/spring-cloud-netflix.adoc#cookies-and-sensitive-headers。
添加
zuul.routes.myroute.sensitiveHeaders=''
到您的 application.yml 或 application.properties ,这会将 sensitiveHeaders 的默认值覆盖为 empty 。
我是 spring 云的新手,在我的项目(一个使用 spring 引导构建的微服务项目)中,我使用了 spring 云版本 Brixton.RC2,它运行良好.但是当我尝试将其版本升级到 Brixton.RELEASE 时,该项目无法与 zuul 一起使用(如果我直接访问 web 微服务,它可以工作,但是如果我通过 zuul 访问,它就不起作用),我没有更改配置中的任何内容。 Maven 依赖项是:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.5.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-parent</artifactId>
<version>Brixton.RC2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
谁能指出我的项目出了什么问题?
谢谢并致以最诚挚的问候!!
我也有同样的问题。我在 Brixton.M4 上并升级到 Brixton.Release 。发生的事情是,当您登录时,请求会到达网关并被路由到 ouath 服务器。但是当 zuul 路由登录请求时,header 丢失了。即缺少 clientId:clientSecret 的 base64 授权 header。这是因为 zuul 中的 Sensitive Headers,这是 Spring Cloud Netflix 1.1 中的新功能。详情请参考https://github.com/spring-cloud/spring-cloud-netflix/blob/master/docs/src/main/asciidoc/spring-cloud-netflix.adoc#cookies-and-sensitive-headers。
添加
zuul.routes.myroute.sensitiveHeaders=''
到您的 application.yml 或 application.properties ,这会将 sensitiveHeaders 的默认值覆盖为 empty 。