mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
MINOR: cfgparse-listen: "dynamic-cookie-key" requires TCP or HTTP mode
Prevent the use of the "dynamic-cookie-key" keyword in proxy sections when TCP or HTTP modes are not set.
This commit is contained in:
parent
d354947365
commit
0b09727a22
@ -676,6 +676,13 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
|
|||||||
if (warnifnotcap(curproxy, PR_CAP_BE, file, linenum, args[0], NULL))
|
if (warnifnotcap(curproxy, PR_CAP_BE, file, linenum, args[0], NULL))
|
||||||
err_code |= ERR_WARN;
|
err_code |= ERR_WARN;
|
||||||
|
|
||||||
|
if (curproxy->mode != PR_MODE_TCP && curproxy->mode != PR_MODE_HTTP) {
|
||||||
|
ha_alert("parsing [%s:%d] : '%s' requires TCP or HTTP mode.\n",
|
||||||
|
file, linenum, args[0]);
|
||||||
|
err_code |= ERR_ALERT | ERR_FATAL;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
if (*(args[1]) == 0) {
|
if (*(args[1]) == 0) {
|
||||||
ha_alert("parsing [%s:%d] : '%s' expects <secret_key> as argument.\n",
|
ha_alert("parsing [%s:%d] : '%s' expects <secret_key> as argument.\n",
|
||||||
file, linenum, args[0]);
|
file, linenum, args[0]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user