Authorization header is removed HTTP/1.1 302 Moved Temporarily so getting 40 unauthorised

Hi Team,

We are developing microservice using sprinboot, when we are connecting external service where there is a URL redirection it is connecting to another URL dynamically.u So we are using sing webclient post() method   which  is configured followRedirect(true);  to manage redirection feature. when ever we are executing this on local workspace all the header param are as it is we are getting successful response  , But in kubernetes Pod environment The Header params are removed during after 302 Moved temporarily and API is failing with 40 Unauthorised.

Kindly assist is there any technique that headers can't be removed for Redirection URL as well from Kubernetes and so that we will get Successful response.

Successful scenario request:user-agent: ReactorNetty/1.0.5
Accept: application/json, text/plain
Content-Type: application/json
Authorization: Basic cHByZF9vbmxpbmU6cHByZE9uxMjM=
sourceSystem: Chatbot34
Host: pprd-ecomm.xxx.co.xx
transactionId: 3253535
content-length: 295

Failure Scenario Request:

user-agent: ReactorNetty/1.0.5

Accept: application/json, text/plain, json/*

sourceSystem: MTN App

Host: pprd-ecomm.XX.co.XX

transactionId: rrt-8941071330066904954-a-geu2-11558-181695713-1

Note: Authorization header is removed in above kubernetes env  and receiving HttpStatusCode = 401 UNAUTHORIZED. Please assist

Regards,

Biswaranjan

 

 

 

 

1 0 165
0 REPLIES 0