blob: ad651a8cd42f72a03634604fb272b4e5d6365a65 [file] [log] [blame]
Willy Tarreaub3cc9f22019-04-19 16:03:32 +02001#
2# This is an example of how to configure HAProxy to be used with WURFL Device Detection module.
3#
4# HAProxy needs to be compiled with support for this. See README section 1.3
5#
6
7global
8
9 # The WURFL data file
10 wurfl-data-file /usr/share/wurfl/wurfl-eval.xml
11
12 # WURFL patches definition (as much as needed, patches will be applied in the same order as specified in this conf file)
13 #wurfl-patch-file /path/to/patch1.xml;
14
15 # WURFL engine target: one of the following (default is performance)
16 wurfl-engine-mode performance
17 #wurfl-engine-mode accuracy
18
19 # WURFL cache: one of the following
20 ## double LRU cache
21 wurfl-cache-size 100000,30000
22 ## single LRU cache
23 #wurfl-cache-size 100000
24 ## no cache
25 #wurfl-cache-size 0
26
27 wurfl-information-list-separator |
28
29 # list of WURFL capabilities, virtual capabilities, property names planned to be used in injected headers
30 wurfl-information-list wurfl_id model_name
31
32defaults
33 mode http
34 timeout connect 30s
35 timeout client 30s
36 timeout server 30s
37
38frontend TheFrontend
39 bind 192.168.1.22:80
40 default_backend TheBackend
41
42 # inject a header called X-Wurfl-All with all the WURFL informations listed in wurfl-information-list
43 http-request set-header X-Wurfl-All %[wurfl-get-all()]
44
45 # inject a header called X-WURFL-PROPERTIES with the "wurfl_id" information (should be listed in wurfl-information-list)
46 #http-request set-header X-WURFL-PROPERTIES %[wurfl-get(wurfl_id)]
47
48backend TheBackend
49 server TheWebServer 192.168.0.40:80