Welcome! Log In Create A New Profile

Advanced

proxy_set_header directives don't inherit from father context

July 05, 2017 01:41AM
i found if i didn't configure any proxy_set_header directives in a context, it will inherit those directives from father context automatic, but if i set one in current context, the inheritance won't work.
my configration is like bellow:

http {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
server {
listen 80;
server_name example.com;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
location / {
proxy_pass http://huiju_nginx_ppr1;
}
}

i expected the X-Forwarded-For and X-Forwarded-Proto header will be set, but it didn't.
what happend?
Subject Author Posted

proxy_set_header directives don't inherit from father context

foxgab July 05, 2017 01:41AM

Re: proxy_set_header directives don't inherit from father context

nanaya July 05, 2017 01:58AM

Re: proxy_set_header directives don't inherit from father context

Francis Daly July 05, 2017 03:22AM

Re: proxy_set_header directives don't inherit from father context

foxgab July 12, 2017 12:26PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 239
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready