File: wurfl-example.cfg

package info (click to toggle)
haproxy 1.7.5-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 8,364 kB
  • ctags: 8,494
  • sloc: ansic: 92,976; xml: 1,754; sh: 1,227; python: 1,005; makefile: 831; perl: 550
file content (49 lines) | stat: -rw-r--r-- 1,485 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#
# This is an example of how to configure HAProxy to be used with WURFL Device Detection module.
#
# HAProxy needs to be compiled with support for this. See README section 1.3
#

global

	# The WURFL data file
	wurfl-data-file		/usr/share/wurfl/wurfl-eval.xml

	# WURFL patches definition (as much as needed, patches will be applied in the same order as specified in this conf file)
	#wurfl-patch-file	/path/to/patch1.xml;

	# WURFL engine target: one of the following (default is performance)
	wurfl-engine-mode	performance
	#wurfl-engine-mode	accuracy

	# WURFL cache: one of the following
	## double LRU cache
	wurfl-cache-size	100000,30000
	## single LRU cache
	#wurfl-cache-size	100000
	## no cache
	#wurfl-cache-size	0

	wurfl-information-list-separator |

	# list of WURFL capabilities, virtual capabilities, property names planned to be used in injected headers
	wurfl-information-list wurfl_id model_name

defaults
	mode http
	timeout connect		30s
	timeout client		30s
	timeout server		30s

frontend TheFrontend
	bind			192.168.1.22:80
	default_backend		TheBackend

	# inject a header called X-Wurfl-All with all the WURFL informations listed in wurfl-information-list
	http-request set-header X-Wurfl-All %[wurfl-get-all()]

	# inject a header called X-WURFL-PROPERTIES with the "wurfl_id" information (should be listed in wurfl-information-list)
	#http-request set-header X-WURFL-PROPERTIES %[wurfl-get(wurfl_id)]

backend TheBackend
	server			TheWebServer 192.168.0.40:80