MINOR: da: Using ARG12 macro for the sample fetch and the convertor.
Regarding the minor update introduced in the
cd6c3c7cb4
commit, the DeviceAtlas
module is now able to use up to 12 device properties via the
new ARG12 macro.
This commit is contained in:
parent
3fa0e2a745
commit
840b0240bc
4
README
4
README
@ -259,11 +259,11 @@ cases.
|
||||
|
||||
All HTTP headers via the sample / fetch
|
||||
|
||||
http-request set-header X-DeviceAtlas-Data %[da-csv-fetch(primaryHardwareType,osName,osVersion,browserName,browserVersion)]
|
||||
http-request set-header X-DeviceAtlas-Data %[da-csv-fetch(primaryHardwareType,osName,osVersion,browserName,browserVersion,browserRenderingEngine)]
|
||||
|
||||
Single HTTP header (e.g. User-Agent) via the convertor
|
||||
|
||||
http-request set-header X-DeviceAtlas-Data %[req.fhdr(User-Agent),da-csv-conv(primaryHardwareType,osName,osVersion,browserName,browserVersion)]
|
||||
http-request set-header X-DeviceAtlas-Data %[req.fhdr(User-Agent),da-csv-conv(primaryHardwareType,osName,osVersion,browserName,browserVersion,browserRenderingEngine)]
|
||||
|
||||
# Mobile content switching with ACL
|
||||
|
||||
|
@ -11678,14 +11678,14 @@ da-csv-conv(<prop>[,<prop>*])
|
||||
input, and to emit a string made of the concatenation of the properties
|
||||
enumerated in argument, delimited by the separator defined by the global
|
||||
keyword "deviceatlas-property-separator", or by default the pipe character
|
||||
('|'). There's a limit of 5 different properties imposed by the haproxy
|
||||
('|'). There's a limit of 12 different properties imposed by the haproxy
|
||||
configuration language.
|
||||
|
||||
Example:
|
||||
frontend www
|
||||
bind *:8881
|
||||
default_backend servers
|
||||
http-request set-header X-DeviceAtlas-Data %[req.fhdr(User-Agent),da-csv(primaryHardwareType,osName,osVersion,browserName,browserVersion)]
|
||||
http-request set-header X-DeviceAtlas-Data %[req.fhdr(User-Agent),da-csv(primaryHardwareType,osName,osVersion,browserName,browserVersion,browserRenderingEngine)]
|
||||
|
||||
debug
|
||||
This converter is used as debug tool. It dumps on screen the content and the
|
||||
|
4
src/da.c
4
src/da.c
@ -347,13 +347,13 @@ static struct cfg_kw_list dacfg_kws = {{ }, {
|
||||
|
||||
/* Note: must not be declared <const> as its list will be overwritten */
|
||||
static struct sample_fetch_kw_list fetch_kws = {ILH, {
|
||||
{ "da-csv-fetch", da_haproxy_fetch, ARG5(1,STR,STR,STR,STR,STR), NULL, SMP_T_STR, SMP_USE_HRQHV },
|
||||
{ "da-csv-fetch", da_haproxy_fetch, ARG12(1,STR,STR,STR,STR,STR,STR,STR,STR,STR,STR,STR,STR), NULL, SMP_T_STR, SMP_USE_HRQHV },
|
||||
{ NULL, NULL, 0, 0, 0 },
|
||||
}};
|
||||
|
||||
/* Note: must not be declared <const> as its list will be overwritten */
|
||||
static struct sample_conv_kw_list conv_kws = {ILH, {
|
||||
{ "da-csv-conv", da_haproxy_conv, ARG5(1,STR,STR,STR,STR,STR), NULL, SMP_T_STR, SMP_T_STR },
|
||||
{ "da-csv-conv", da_haproxy_conv, ARG12(1,STR,STR,STR,STR,STR,STR,STR,STR,STR,STR,STR,STR), NULL, SMP_T_STR, SMP_T_STR },
|
||||
{ NULL, NULL, 0, 0, 0 },
|
||||
}};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user