manlio_perillo at libero.it
Thu Apr 8 01:38:13 MSD 2010
Harmer, Sean ha scritto:
> NGINX Team,
> Is there a way to capture the User-Agent from an HTTP Header, then query
> a database for that User-Agent, then based on the result of the database
> query, transparently route the request to an appropriate server?
The User-Agent is in $http_user_agent variable.
If you want to extract a more useful information, you need to use the
perl module, or a custom module (but, as far as I know, there is no
module that allow you to extract useful data from User-Agent header).
For database lookup, you can use the builtin map module:
More information about the nginx