location / {
proxy_pass http://mysite.com;
proxy_set_header Host http://mysite.com;;
proxy_pass_request_headers on;
more_set_headers 'HTTP_Country-Code: $geoip_country_code';
}
그러나 이 문제는 답변서에서 헤더입니다 설정합니다. &Quot 사용하여, more_set_input_headers" 찾았다. 대신 more_set_headers" "; 그런데, 응답 헤더를 isn& # 39 전달되지 못할 정도였습니다.
나는 어떤 누각되었습니다 여기서요?
스케쳐내 데이터베이스에구성원을 가상본 가변적입니다 통과할 수 백 가상본 모듈에서는 it 의 설정할 수 있습니다.
location / {
proxy_pass http://example.com;
proxy_set_header Host example.com;
proxy_set_header HTTP_Country-Code $geoip_country_code;
proxy_pass_request_headers on;
}
그리고 이제 it& # 39 에 전달된 가상본 백.
문제는 & # 39 _& # 39;; 밑줄 에서 사용할 수 없는 헤더입니다 속성이 있다. 밑줄 제거할 경우 서버 블록이어야 추가할 수 있는 대안이 아니다.
underscores_in_headers on;
이것은 기본적으로 의견을 에서 복사 및 붙여넣습니다 @kishorer747 @Fleshgrinder 오토메이티드, 솔루션 출신이다. # 586997 https://serverfault.com/questions/586970/nginx-is-not-forwarding-a-header-value-when-using-proxy-pass/586997
나는 내 뒤에 추가된 nginx 는 다음과 같은 경우 응용 프로그램이 아니라 내부 및 클라이언트 app 간에 이루어진 나기스 apc® 정말 괜찮아요 곧 내, 내 플라스크 헤더도 app 이 더 이상 볼 수 없는 것이다. 그런 시간이 오래 전송되었기 디버그입니다.