]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
DOC: README: explain how to build with DeviceAtlas
authorDavid Carlier <dcarlier@afilias.info>
Mon, 1 Jun 2015 12:21:47 +0000 (14:21 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 2 Jun 2015 11:42:11 +0000 (13:42 +0200)
This diff is related to the additional documentation in
order to build the DeviceAtlas module and in addition with
an example of a basic configuration.

README

diff --git a/README b/README
index b98b919b07fdff785f158b1637dbc615f1fde1ec..c6552d1745d614da9468a05cb7ef2f91e0236110 100644 (file)
--- a/README
+++ b/README
@@ -204,6 +204,34 @@ disabled by setting USE_POLL="". For example :
     $ gmake TARGET=tiny USE_POLL="" TARGET_CFLAGS=-fomit-frame-pointer
 
 
+1.1) DeviceAtlas Device Detection
+---------------------------------
+
+In order to add DeviceAtlas Device Detection support, you would need to download
+the API source code from https://deviceatlas.com/deviceatlas-haproxy-module and
+once extracted :
+
+    $ make TARGET=<target> USE_PCRE=1 USE_DEVICEATLAS=1 DEVICEATLAS_INC=<path to the API root folder> DEVICEATLAS_LIB=<path to the API root folder>
+
+These are supported DeviceAtlas directives (see doc/configuration.txt) :
+  - deviceatlas-json-file <path to the DeviceAtlas JSON data file>.
+  - deviceatlas-log-level <number> (0 to 3, level of information returned by
+    the API, 0 by default).
+  - deviceatlas-property-separator <character> (character used to separate the
+    properties produced by the API, | by default).
+
+Sample configuration :
+
+    global
+       deviceatlas-json-file <path to json file>
+
+    ...
+    frontend
+       bind *:8881
+       default_backend servers
+       http-request set-header X-DeviceAtlas-Data %[req.fhdr(User-Agent),da-csv(primaryHardwareType,osName,osVersion,browserName,browserVersion)]
+
+
 2) How to install it
 --------------------