Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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:

  • User Agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
  • IP Address: 199.x.x.x

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?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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