Client information include the following data:
The User Agent refers to the application used by the client to access AFS v7 and usually describes:
- a Web Browser (Internet Explorer, Firefox, Safari, Chrome...) if a human is using AFS,
- a Robot (Googlebot, wget...) if an automated system accesses AFS.
The IP Address indicates where the requests originates from and usually points either directly to the client computer, or to a router or similar device allowing him to access AFS.It is critical for AFS to retrieve accurate values to identify each client in order to produce rich logs for each Web Service.
If AFS is directly called from the browsers of the visitors then standard HTTP mechanisms (User-Agent and Remote-Addr headers) are used to seamlessly fetch client information.
If AFS is called by a third party piece of software (proxy, PHP or other web application, ...) then caution must be taken in order to propagate client information otherwise AFS logs the same client information for each request, i.e. the client information of the intermediate software.
Third party software can propagate the client information of the visitors by either:
- setting standard HTTP environment variables from the software ($HTTP_USER_AGENT and $HTTP_REMOTE_ADDR). These variables are the standardized counterparts of the HTTP Headers
- setting AFS-Specific variables from the software: $HTTP_X_AFS7_USER_AGENT and $HTTP_X_AFS7_REMOTE_ADDR. In some cases it might be easier for the software to set these variables than to alter the standard HTTP variables.
The widely used $HTTP_X_FORWARDED_FOR (accounting for the X-Forwarded-For HTTP header) can be used as an alias for $HTTP_X_AFS7_USER_AGENT.
AFS supports the syntax "X-Forwarded-For: client1, proxy1, proxy2 " where a comma separated list is used to trace the full path from the client to AFS via several proxies.