주 메뉴 열기

wwiki β

바뀜

Nginx

195 바이트 추가됨, 2023년 10월 27일 (금) 08:18
proxy_set_header
https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_set_header
[[HTTP#X-Forwarded-For .28XFF.29|X-Forwarded-For]], [[HTTP#X-Forwarded-Proto .28XFP.29|X-Forwarded-Proto]], [[HTTP#X-Forwarded-Host .28XFH.29|X-Forwarded-Host]] 을 주로 설정하는데, HttpContext.Connection.RemoteIpAddress는 X-Forwarded-For 헤더 값을 사용하여 설정됩니다. HttpContext.Request.Scheme은 X-Forwarded-Proto 헤더 값을 사용하여 설정됩니다. HttpContext.Request.Host는 X-Forwarded-Host 헤더 값을 사용하여 설정됩니다.<syntaxhighlight lang="nginx">proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header X-Forwarded-Proto $scheme;proxy_set_header X-Forwarded-Host $host;</syntaxhighlight>
=== 변수 ===
편집
2,431