From: Ben Shillito Date: Fri, 2 Dec 2016 14:25:37 +0000 (+0000) Subject: DOC: Added 51Degrees conv and fetch functions to documentation. X-Git-Tag: v1.8-dev1~306 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f25e8e56b4c591df1b2dfb2421fdcd94de31c41f;p=thirdparty%2Fhaproxy.git DOC: Added 51Degrees conv and fetch functions to documentation. Definitions and examples for 51d.single and 51d.all have been added to configuration.txt so it now appears in online documentation in addition to the README, The 51degrees-property-name-list entry has also been updated to make it clear that multiple properties can be added. --- diff --git a/doc/configuration.txt b/doc/configuration.txt index 18da5b982e..ae76ef3176 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -975,7 +975,7 @@ description Please note that this option is only available when haproxy has been compiled with USE_51DEGREES. -51degrees-property-name-list [] +51degrees-property-name-list [ ...] A list of 51Degrees property names to be load from the dataset. A full list of names is available on the 51Degrees website: https://51degrees.com/resources/property-dictionary @@ -12157,6 +12157,23 @@ bool) which make it possible to report a match without having to write an ACL. The currently available list of transformation keywords include : +51d.single([,*]) + Returns values for the properties requested as a string, where values are + separated by the delimiter specified with "51degrees-property-separator". + The device is identified using the User-Agent header passed to the + converter. The function can be passed up to five property names, and if a + property name can't be found, the value "NoData" is returned. + + Example : + # Here the header "X-51D-DeviceTypeMobileTablet" is added to the request + # containg values for the three properties requested by using the + # User-Agent passed to the converter. + frontend http-in + bind *:8081 + default_backend servers + http-request set-header X-51D-DeviceTypeMobileTablet \ + %[req.fhdr(User-Agent),51d.single(DeviceType,IsMobile,IsTablet)] + add() Adds to the input value of type signed integer, and returns the result as a signed integer. can be a numeric value or a variable @@ -13557,6 +13574,23 @@ when no content is yet made available. The fetch methods described here are usable as low as the "tcp-request content" rule sets unless they require some future information. Those generally include the results of SSL negotiations. +51d.all([,*]) : string + Returns values for the properties requested as a string, where values are + separated by the delimiter specified with "51degrees-property-separator". + The device is identified using all the important HTTP headers from the + request. The function can be passed up to five property names, and if a + property name can't be found, the value "NoData" is returned. + + Example : + # Here the header "X-51D-DeviceTypeMobileTablet" is added to the request + # containing the three properties requested using all relevant headers from + # the request. + frontend http-in + bind *:8081 + default_backend servers + http-request set-header X-51D-DeviceTypeMobileTablet \ + %[51d.all(DeviceType,IsMobile,IsTablet)] + ssl_bc : boolean Returns true when the back connection was made via an SSL/TLS transport layer and is locally deciphered. This means the outgoing connection was made