Open adiletkabylbekov opened 8 months ago
Hi, did you look at these reverse proxy settings ?
Hi, did you look at these reverse proxy settings ?
that setting is related to env where chproxy behind proxy, our case is request to ClickHouse goes throw proxy it's not same things
my bad, I read the issue to face. In this case. This issue is quite specific and the core maintainers don't have a lot of time to work on chproxy. So, feel free to add the feature in the code and we'll review the PR.
We have env where connection to ClickHouse node goes throw NGINX reverse proxy, with custom server_name (virtual host) and acl on that, so CHProxy sends user requests throw that NGINX reverse proxy. CHProxy config:
Faced behaviour when CHProxy sets invalid
host
header when serving http query to CH node, it's just resend header from user requestExample:
such request is rejected by NGINX alc because it was going to default virtual host (where another acl was configured), not to configured server_name, because 'host header' was not matched
if we added required
host
header to request to CHProxy, query was successfully maintained by CH node, cause it was passed all configs and acl on NGINX reverse proxyI guess need to rewrite
host
header on requests from CHProxy to ClickHouse to proper value