MINOR: log/backend: prevent "http-send-name-header" use with LOG mode

It doesn't make sense to use the "http-send-name-header" directive inside
a log backend so we report a warning in with case and reset the setting.
This commit is contained in:
Aurelien DARRAGON 2023-11-16 17:11:37 +01:00 committed by Willy Tarreau
parent 4b2616f784
commit c7783fb32b

View File

@ -915,6 +915,13 @@ static int _postcheck_log_backend_compat(struct proxy *be)
free_stick_rules(&be->storersp_rules);
free_stick_rules(&be->sticking_rules);
}
if (isttest(be->server_id_hdr_name)) {
ha_warning("Cannot set \"server_id_hdr_name\" with 'mode log' in %s '%s'. It will be ignored.\n",
proxy_type_str(be), be->id);
err_code |= ERR_WARN;
istfree(&be->server_id_hdr_name);
}
return err_code;
}