Closed TCeason closed 2 weeks ago
cc @wubx
In cloud, the client ip will be gateway?
In cloud, the client ip will be gateway?
cc @flaneur2020 @ZhiHanZ Cloud you please answer this question?
BTW, we had a method get_client_ip it use the same way to parse req.uri.
In cloud, the client ip will be gateway?
not only cloud, whenever you put a proxy up front of the query instances, you will get the ip of the proxy.
when you had a proxy, it'd better to utilize the get_client_ip()
method to get the real client ip which proxy added into the headers like X-Real-IP
.
In cloud, the client ip will be gateway?
not only cloud, whenever you put a proxy up front of the query instances, you will get the ip of the proxy.
when you had a proxy, it'd better to utilize the
get_client_ip()
method to get the real client ip which proxy added into the headers likeX-Real-IP
.
So in cloud it will display as null? Because only a IP can not parse as socketaddr.
https://github.com/datafuselabs/databend/issues/15359#issuecomment-2081412247
Here the host is ip:port
In cloud, the client ip will be gateway?
not only cloud, whenever you put a proxy up front of the query instances, you will get the ip of the proxy. when you had a proxy, it'd better to utilize the
get_client_ip()
method to get the real client ip which proxy added into the headers likeX-Real-IP
.So in cloud it will display as null? Because only a IP can not parse as socketaddr.
Here the host is ip:port
IMHO it will be filled up with the proxy's ip address ๐ค
In cloud, the client ip will be gateway?
not only cloud, whenever you put a proxy up front of the query instances, you will get the ip of the proxy. when you had a proxy, it'd better to utilize the
get_client_ip()
method to get the real client ip which proxy added into the headers likeX-Real-IP
.So in cloud it will display as null? Because only a IP can not parse as socketaddr. #15359 (comment) Here the host is ip:port
IMHO it will be filled up with the proxy's ip address ๐ค
Does the show procelist need to display ports?
Now the get client ip address will be obtained from the header. But this is a pure ip, and it's represented by a string.
In our current session ctx, client_ip is Option
This appears to be CK-compatible behavior. But the port should be meaningless information.
So you want to set session _ctx.client_ip: Option
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
Fix show processlit host is null in HTTPQuery.
In HTTP auth , init the client addr.
Tests
Type of change
This change isโ