Elastic Search Basic Authentication overriding the JWT headers issue while trying to access elastic db

I have a Gateway service for checking authentication and authorizations, then a microservice connecting to an elastic database. For a request I am making, I have to pass JWT token in headers to get authenticated at Gateway API and pass the request to the main microservice. The elastic DB is also expecting basic authentication, so in the microservice, I am passing username and password along with my request to DB Call. Everything is working fine, but I am facing an issue when I try to access elastic DB from outside. When the elastic DB has no authentication, I was able to access it from Postman. Now, I have to pass JWT authentication and Basic Authentication the Elastic DB is expecting. They are having the same key "Authorization", so the recently added one is only passed in the request. Did anyone faced same issue? Please share your suggestions.

I am using dotnet core microservice (NEST Package V6.8)

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.