diff --git a/frontend/nginx.conf b/frontend/nginx.conf index c5ce3d5..f92b0c5 100644 --- a/frontend/nginx.conf +++ b/frontend/nginx.conf @@ -5,6 +5,12 @@ server { index index.html; # 폴더 주소로 넘길 때 포트가 빠지지 않게 상대 주소로 보낸다 absolute_redirect off; + # 앞단 프록시(사설망)가 붙인 X-Forwarded-For 에서 실제 접속 주소를 꺼내 $remote_addr 로 쓴다 (비로그인 좋아요를 IP 로 세려고) + set_real_ip_from 172.16.0.0/12; + set_real_ip_from 10.0.0.0/8; + set_real_ip_from 192.168.0.0/16; + real_ip_header X-Forwarded-For; + real_ip_recursive on; gzip on; gzip_types text/css application/javascript image/svg+xml application/json;