location / {
proxy_pass http://example:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
nginx를 보통 이렇게 설정 많이하길래 따라했음. 검색해보니까 이렇게 하면 클라이언트 IP가 뜬다는데
클라이언트가 나니까 크롬 개발자도구에서 Remote Address가 내 IP가 떠야되는거 아님??
전혀 다른 IP가 뜨는데 뭐임??
proxy_pass 대상인 example.com:8000 이 받는 http 요청에 클라이언트 ip가담긴 헤더가(x-forwarded-for) 있다는 말임 저 헤더는 요청 헤더라 클라이언트가 받는 응답헤더에는 없음
아하 감사합니다