blob: c9686151324b79c1ed69e8f470faa60ace55c66d [file] [log] [blame]
scientiamobiled0027ed2016-11-04 10:55:08 +01001Scientiamobile WURFL Device Detection
Willy Tarreau29b25312016-11-08 14:57:29 +01002-------------------------------------
scientiamobiled0027ed2016-11-04 10:55:08 +01003
4You can also include WURFL for inbuilt device detection enabling attributes.
5
6WURFL is a high-performance and low-memory footprint mobile device detection
7software component that can quickly and accurately detect over 500 capabilities
8of visiting devices. It can differentiate between portable mobile devices, desktop devices,
9SmartTVs and any other types of devices on which a web browser can be installed.
10
11In order to add WURFL device detection support, you would need to download Scientiamobile
12InFuze C API and install it on your system. Refer to www.scientiamobile.com to obtain a valid
13InFuze license.
14Compile haproxy as shown :
15
16 $ make TARGET=<target> USE_WURFL=1
17
18Optionally WURFL_DEBUG=1 may be set to increase logs verbosity
19
20These are the supported WURFL directives (see doc/configuration.txt) :
21- wurfl-data-file <path to WURFL data file>
22- wurfl-information-list [<string>] (list of WURFL capabilities,
23 virtual capabilities, property names we plan to use in injected headers)
24- wurfl-information-list-separator <char> (character that will be
25 used to separate values in a response header, ',' by default).
26- wurfl-engine-mode <string> (Sets the WURFL engine target. You can choose
27 between "accuracy" and "performance","performance" by default)
28- wurfl-cache-size <string> (Sets the WURFL caching strategy)
29- wurfl-patch-file [<file path>] (Sets the paths to custom WURFL patch files)
30
31Sample configuration :
32
33 global
34 wurfl-data-file /usr/share/wurfl/wurfl-eval.xml
35
36 wurfl-information-list wurfl_id model_name
37
38 #wurfl-information-list-separator |
39
40 wurfl-engine-mode performance
41 #wurfl-engine-mode accuracy
42
43 ## double LRU cache
44 wurfl-cache-size 100000,30000
45 ## single LRU cache
46 #wurfl-cache-size 100000
47 ## no cache
48 #wurfl-cache-size 0
49
50 #wurfl-patch-file <paths to custom patch files>
51
52 ...
53 frontend
54 bind *:8888
55 default_backend servers
56
57There are two distinct methods available to transmit the WURFL data downstream
58to the target application:
59
60All data listed in wurfl-information-list
61
62 http-request set-header X-WURFL-All %[wurfl-get-all()]
63
64A subset of data listed in wurfl-information-list
65
66 http-request set-header X-WURFL-Properties %[wurfl-get(wurfl_id,is_tablet)]
67
68Please find more information about WURFL and the detection methods at https://www.scientiamobile.com