We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have prepared a forward proxy as follows:
`http { log_format main '[$time_local] request="$request" status="$status" bytes="$body_bytes_sent" user="$http_user_agent" request_time="$request_time" x_appname="$http_x_appname" x_appcontext="$http_x_appcontext"';
access_log /var/log/nginx/access-8888.log main; ignore_invalid_headers on;
server { listen 8888; resolver 8.8.8.8 ipv6=off; proxy_connect; proxy_connect_allow all; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme;
location / { proxy_pass http://$http_host$request_uri; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } } }`
When my request is via http, the headers are captured fine: curl --proxy http://localhost:8888 -H "X-AppName: TEST" http://ipinfo.io/json 2024/12/18 12:18:53 [debug] 15#0: *64 http header: "Host: ipinfo.io" 2024/12/18 12:18:53 [debug] 15#0: *64 http header: "User-Agent: curl/7.68.0" 2024/12/18 12:18:53 [debug] 15#0: *64 http header: "Accept: /" 2024/12/18 12:18:53 [debug] 15#0: *64 http header: "Proxy-Connection: Keep-Alive" 2024/12/18 12:18:53 [debug] 15#0: *64 http header: "X-AppName: TEST"
curl --proxy http://localhost:8888 -H "X-AppName: TEST" http://ipinfo.io/json
When my request is via https, headers are not visible: curl --proxy http://localhost:8888 -H "X-AppName: TEST" https://ipinfo.io/json
curl --proxy http://localhost:8888 -H "X-AppName: TEST" https://ipinfo.io/json
2024/12/18 12:19:10 [debug] 15#0: *66 http header: "Host: ipinfo.io:443" 2024/12/18 12:19:10 [debug] 15#0: *66 http header: "User-Agent: curl/7.68.0" 2024/12/18 12:19:10 [debug] 15#0: *66 http header: "Proxy-Connection: Keep-Alive"
What could be the problem? Have I missed any settings or is it a bug in the module itself?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have prepared a forward proxy as follows:
`http {
log_format main '[$time_local] request="$request" status="$status" bytes="$body_bytes_sent" user="$http_user_agent" request_time="$request_time" x_appname="$http_x_appname" x_appcontext="$http_x_appcontext"';
access_log /var/log/nginx/access-8888.log main;
ignore_invalid_headers on;
server {
listen 8888;
resolver 8.8.8.8 ipv6=off;
proxy_connect;
proxy_connect_allow all;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
location / {
proxy_pass http://$http_host$request_uri;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
}`
When my request is via http, the headers are captured fine:
curl --proxy http://localhost:8888 -H "X-AppName: TEST" http://ipinfo.io/json
2024/12/18 12:18:53 [debug] 15#0: *64 http header: "Host: ipinfo.io"
2024/12/18 12:18:53 [debug] 15#0: *64 http header: "User-Agent: curl/7.68.0"
2024/12/18 12:18:53 [debug] 15#0: *64 http header: "Accept: /"
2024/12/18 12:18:53 [debug] 15#0: *64 http header: "Proxy-Connection: Keep-Alive"
2024/12/18 12:18:53 [debug] 15#0: *64 http header: "X-AppName: TEST"
When my request is via https, headers are not visible:
curl --proxy http://localhost:8888 -H "X-AppName: TEST" https://ipinfo.io/json
2024/12/18 12:19:10 [debug] 15#0: *66 http header: "Host: ipinfo.io:443"
2024/12/18 12:19:10 [debug] 15#0: *66 http header: "User-Agent: curl/7.68.0"
2024/12/18 12:19:10 [debug] 15#0: *66 http header: "Proxy-Connection: Keep-Alive"
What could be the problem? Have I missed any settings or is it a bug in the module itself?
The text was updated successfully, but these errors were encountered: