mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-15 20:39:44 -04:00
[MINOR] config: don't accept 'appsession' in defaults section
Maybe appsession should be forbidden in the 'defaults' section as it
will not work in the backends.
(cherry picked from commit 3b7a369baa)
This commit is contained in:
parent
1b81667094
commit
f2432b0c80
1 changed files with 6 additions and 0 deletions
|
|
@ -1353,6 +1353,12 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int inv)
|
|||
else if (!strcmp(args[0], "appsession")) { /* cookie name */
|
||||
int cur_arg;
|
||||
|
||||
if (curproxy == &defproxy) {
|
||||
Alert("parsing [%s:%d] : '%s' not allowed in 'defaults' section.\n", file, linenum, args[0]);
|
||||
err_code |= ERR_ALERT | ERR_FATAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (warnifnotcap(curproxy, PR_CAP_BE, file, linenum, args[0], NULL))
|
||||
err_code |= ERR_WARN;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue