Reputation: 1945
I'm working on a Spring Cloud Zuul gateway to put in front of my spring boot application. I use basic authorization on the applications side. When I do a call to the gateway with the proper authorization header I always get 401 Unauthorized
"status": 401,
"error": "Unauthorized",
"message": "Full authentication is required to access this resource"
But when I do the request directly towards the application it works.
Upvotes: 3
Views: 5535
Reputation: 1945
Specifying sensitive-headers
property without Authorization
value in Zuul routes will forward the Authorization header towards the application.
By default it has hese values: Cookie,Set-Cookie,Authorization
bootstrap.yml:
zuul:
ignoredServices: '*'
routes:
application:
path: /application/**
serviceId: application
sensitive-headers: Cookie,Set-Cookie
Upvotes: 7