Reputation: 45
I am newer in spring cloud, in my project (a microservice project build with spring boot), I used spring cloud version Brixton.RC2, and it worked fine. but when I try to upgrade its version to Brixton.RELEASE, the project is not work with zuul (if I access web microservice directly, it works, but if I access through zuul, it does not work), I didn't change anything in configuration. the maven dependency is:
<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>
can anyone specify what goes wrong with my project?
Thanks and Best regards!!
Upvotes: 4
Views: 357
Reputation: 646
Even I have the same problem . I was on Brixton.M4 and upgraded to Brixton.Release . What is happening is , when you login , the request is hitting gateway and is being routed to ouath server . But when zuul routes the login request , the header is missing . ie the authorization header with base64 of clientId:clientSecret is missing . This is because of Sensitive Headers in zuul , which is new in Spring Cloud Netflix 1.1 . Please refer https://github.com/spring-cloud/spring-cloud-netflix/blob/master/docs/src/main/asciidoc/spring-cloud-netflix.adoc#cookies-and-sensitive-headers for more information.
Add
zuul.routes.myroute.sensitiveHeaders=''
to your application.yml or application.properties , which will overwrite the default value of sensitiveHeaders to empty .
Upvotes: 1