-
Notifications
You must be signed in to change notification settings - Fork 913
Haproxy Add one more x-forwardfor-for when add “option forwardfor” #44
Copy link
Copy link
Closed
Labels
status: works as designedThis issue stems from a misunderstanding of how HAProxy is supposed to work.This issue stems from a misunderstanding of how HAProxy is supposed to work.type: bugThis issue describes a bug.This issue describes a bug.
Description
version 1.7.8
Host: 192.168.1.101
Haproxy configuration
global
daemon
maxconn 100000
stats timeout 2m
pidfile /tmp/http.pid
defaults
timeout http-request 10s
timeout server 120s
timeout client 20s
timeout connect 4s
timeout tunnel 30m
retries 3
balance roundrobin
option abortonclose
option forwardfor # Forward X-Forwarded-For
option redispatch
frontend http
bind :80
mode http
default_backend test_svr
backend test_svr
mode http
server 192.168.1.102:8080 192.168.1.102:8080
The request Header info:
GET /api HTTP/1.0
X-Forwarded-For: 192.168.1.10, 192.168.1.11 ---> from request
Proxy-Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36 /2.2.1.8
Accept-Encoding: gzip
X-Forwarded-For: 192.168.1.101 ---> Haproxy Added.
Why there are two X-Forwarded-For ???
Why Haproxy added a new X-Forwarded-For but not append It's Host ipaddress to the exsit one?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status: works as designedThis issue stems from a misunderstanding of how HAProxy is supposed to work.This issue stems from a misunderstanding of how HAProxy is supposed to work.type: bugThis issue describes a bug.This issue describes a bug.