X-Forwarded-Host header of OracleCloud LoadBalancer adds port alongwith the host. Is this correct?

423 Views Asked by At

As per my understanding, whenever there is a forward proxy or loadbalancer in the network, it must keep only the Host part in it. But the LoadBalancer used in OracleCloudInfrastrcture is adding both the Host as well as port separated by a colon(:).

Due to this my application logic, and perhaps Swagger-UI is failing. Is this allowed as per the specs?

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host

1

There are 1 best solutions below

0
On BEST ANSWER

These headers aren't formalized yet. And Oracle has documented this here: https://docs.oracle.com/en-us/iaas/Content/Balance/Reference/httpheaders.htm#:~:text=X%2DForwarded%2DHost,original%20server%20handling%20the%20request

One will need to parse the host part through this header accordingly.