MINOR: fcgi-app: "use-fcgi-app" requires TCP or HTTP mode

Prevent the use of the "use-fcgi-app" keyword in proxy sections where
neither TCP nor HTTP mode is set.
This commit is contained in:
Aurelien DARRAGON 2023-09-19 18:28:44 +02:00 committed by Christopher Faulet
parent b41b77b4cc
commit 0ba731f50b
1 changed files with 6 additions and 0 deletions

View File

@ -591,6 +591,12 @@ static int proxy_parse_use_fcgi_app(char **args, int section, struct proxy *curp
goto end;
}
if (curpx->mode != PR_MODE_TCP && curpx->mode != PR_MODE_HTTP) {
memprintf(err, "'%s' requires TCP or HTTP mode", args[0]);
retval = -1;
goto end;
}
if (!*(args[1])) {
memprintf(err, "'%s' expects <name> as argument", args[0]);
retval = -1;