spring cloud gateway pass an sensitiveHeaders like Authorization to backend service?

Viewed 93

My spring cloud gateway cors configuration:


 gateway:
      globalcors:
        cors-configurations:
          '[/**]':
            allow-credentials: true
            allowedHeaders: "*"
            allowedOrigins: "*"
            allowedMethods:
              - GET
              - POST
              - DELETE
              - PUT
              - OPTION
            max-age: 3600

I think this configuration should be able to fix this problom, But it's not what I expect. The backend service api /oauth/token still return "401 Unauthorized". BTW: My backend service integrate with spring sercurity.

0 Answers
Related