HAProxy Enterprise Documentation 2.2r1

Use fetches to perform database lookups

wurfl-get

Use the fetch method wurfl-get to perform a lookup in the database that returns the values of the specified properties. You must declare these properties beforehand with the wurfl-information-list global directive.

Syntax:

wurfl-get(<prop>[,<prop>*])

In this example we create an HTTP request header that contains device information.

frontend www
   bind :80
   mode http
   http-request set-header X-WURFL-Properties %[wurfl-get(wurfl_id,model_name)]

wurfl-get-all

Use the fetch method wurfl-get-all to perform a lookup in the database that returns values for all properties that the wurfl-information-list directive declared.

Syntax:

wurfl-get-all()

In this example we create an HTTP request header that contains all the device properties.

frontend www
   bind :80
   mode http
   http-request set-header X-WURFL-All %[wurfl-get-all()]

Next up

Update the database during runtime