I have an application that sits behind an F5 load balancer. The application needs to be aware of the User Agent and IP address of the inital request.

For example:

I am able to get the IP from the load balancer by reading the X_FORWARDED_FOR header value in my application. However, I'm not sure how to get the user agent. Is that information even passed along?


The user agent is definitely passed along. We see it in our logs all the time. It should be passing all of the client sent headers by default. If you're not seeing it, I'm thinking there must be some special config your F5 has stripping it out.

In your application are you not seeing it for any requests or just certain request? User-Agent is an optional header because the RFC states that User-Agents SHOULD submit, but don't have to.

This isn't really an answer for you, but I don't have the rep to just comment.


Typically, a reverse proxy passes the User-Agent header through unmolested - but I can't speak for the F5s.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.