add optional debug for haproxy siteconfig
This commit is contained in:
parent
2f57438489
commit
ed0983b633
1 changed files with 7 additions and 0 deletions
|
@ -12,6 +12,8 @@
|
||||||
, extraUseBackendConditions ? {}
|
, extraUseBackendConditions ? {}
|
||||||
, extraFrontendOptions ? []
|
, extraFrontendOptions ? []
|
||||||
, extraBackendOptions ? []
|
, extraBackendOptions ? []
|
||||||
|
|
||||||
|
, debugHeaders ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
@ -73,6 +75,11 @@ in
|
||||||
acl acl_${serviceName} hdr_beg(host) ${serviceName}.${extraAclsCondition}
|
acl acl_${serviceName} hdr_beg(host) ${serviceName}.${extraAclsCondition}
|
||||||
''
|
''
|
||||||
+ concatMapStrings (x: x + "\n") extraFrontendOptions
|
+ concatMapStrings (x: x + "\n") extraFrontendOptions
|
||||||
|
+ concatMapStrings (x: x + "\n") (optionals debugHeaders [
|
||||||
|
"option httplog"
|
||||||
|
"http-request capture req.hdrs len 512 if acl_${serviceName}${extraAclsOr}"
|
||||||
|
''log-format "%ci:%cp [%tr] %ft [[%hr]] %hs %{+Q}r"''
|
||||||
|
])
|
||||||
+ ''
|
+ ''
|
||||||
use_backend ${serviceName} if acl_${serviceName}${extraAclsOr}
|
use_backend ${serviceName} if acl_${serviceName}${extraAclsOr}
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue