mirror of
https://github.com/curl/curl.git
synced 2026-08-26 07:23:31 +03:00
haproxy: add --haproxy-clientip flag to spoof client IPs
CURLOPT_HAPROXY_CLIENT_IP in the library Closes #10779
This commit is contained in:
parent
9ad23c38e5
commit
0a75964d0d
21 changed files with 267 additions and 4 deletions
|
|
@ -2161,6 +2161,11 @@ static CURLcode single_transfer(struct GlobalConfig *global,
|
|||
if(config->haproxy_protocol)
|
||||
my_setopt(curl, CURLOPT_HAPROXYPROTOCOL, 1L);
|
||||
|
||||
/* new in 8.2.0 */
|
||||
if(config->haproxy_clientip)
|
||||
my_setopt_str(curl, CURLOPT_HAPROXY_CLIENT_IP,
|
||||
config->haproxy_clientip);
|
||||
|
||||
if(config->disallow_username_in_url)
|
||||
my_setopt(curl, CURLOPT_DISALLOW_USERNAME_IN_URL, 1L);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue