Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
I add a test location to the Nginx config:
location /test/ {
proxy_set_header Host test.com;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_http_version 1.1;
proxy_pass http://192.168.254.1:3434/;
}
nc -lvp 3434
curl -H "X-Test: test" https://example.com/test/
Listening on [0.0.0.0] (family 0, port 3434)
Connection from 172.17.0.2 43098 received!
GET / HTTP/1.1
Host: test.com
X-Forwarded-For: 192.168.254.254
X-Real-IP: 192.168.254.254
Connection: close
user-agent: curl/7.68.0
accept: */*
x-test: test
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question