blob: 0d61db0a082fcee6dab3f9706f0088fe81de0253 [file] [log] [blame]
Willy Tarreaub3cc9f22019-04-19 16:03:32 +02001Scientiamobile WURFL Device Detection
2-------------------------------------
3
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).
Willy Tarreaub3cc9f22019-04-19 16:03:32 +020026- wurfl-cache-size <string> (Sets the WURFL caching strategy)
27- wurfl-patch-file [<file path>] (Sets the paths to custom WURFL patch files)
28
29Sample configuration :
30
31 global
paulborilebad132c2019-04-18 11:57:04 +020032 wurfl-data-file /usr/share/wurfl/wurfl.zip
Willy Tarreaub3cc9f22019-04-19 16:03:32 +020033
34 wurfl-information-list wurfl_id model_name
35
36 #wurfl-information-list-separator |
37
Willy Tarreaub3cc9f22019-04-19 16:03:32 +020038 ## single LRU cache
39 #wurfl-cache-size 100000
40 ## no cache
41 #wurfl-cache-size 0
42
43 #wurfl-patch-file <paths to custom patch files>
44
45 ...
46 frontend
47 bind *:8888
48 default_backend servers
49
50There are two distinct methods available to transmit the WURFL data downstream
51to the target application:
52
53All data listed in wurfl-information-list
54
55 http-request set-header X-WURFL-All %[wurfl-get-all()]
56
57A subset of data listed in wurfl-information-list
58
59 http-request set-header X-WURFL-Properties %[wurfl-get(wurfl_id,is_tablet)]
60
61Please find more information about WURFL and the detection methods at https://www.scientiamobile.com