diff --git a/doc/management.txt b/doc/management.txt index 218994356..bdd52b4cc 100644 --- a/doc/management.txt +++ b/doc/management.txt @@ -1740,10 +1740,7 @@ add backend from [mode ] [guid ] [ EXPERIMENTAL ] All named default proxies can be used, given that they validate the same inheritance rules applied during configuration parsing. There is some - exceptions though, for example when the mode is neither TCP nor HTTP. Another - exception is that it is not yet possible to use a default proxies which - reference custom HTTP errors, for example via the errorfiles or http-rules - keywords. + exceptions though, for example when the mode is neither TCP nor HTTP. This command is restricted and can only be issued on sockets configured for level "admin". Moreover, this feature is still considered in development so it diff --git a/src/cfgparse.c b/src/cfgparse.c index 03578b144..d89acfeb6 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -63,6 +63,7 @@ #include #include #include +#include #include #include #include @@ -2392,6 +2393,8 @@ int check_config_validity() else { cfgerr += acl_find_targets(defpx); } + + err_code |= proxy_check_http_errors(defpx); } /* starting to initialize the main proxies list */ diff --git a/src/proxy.c b/src/proxy.c index a72370aa4..2efef1090 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -4918,10 +4918,6 @@ static int cli_parse_add_backend(char **args, char *payload, struct appctx *appc def_name, proxy_mode_str(defpx->mode))); return 1; } - if (!LIST_ISEMPTY(&defpx->conf.errors)) { - cli_dynerr(appctx, memprintf(&msg, "Dynamic backends cannot inherit from default proxy '%s' because it references HTTP errors.\n", def_name)); - return 1; - } thread_isolate();