X-Forwarded-For(2)
-
Spring boot 로그에 X-Forwarded-For를 통해서 client IP 기록하기
application.ymlserver: port: {port} tomcat: use-relative-redirects: true basedir: . accesslog: enabled: true pattern: '%{yyyy-MM-dd HH:mm:ss}t %s %r %{User-Agent}i %{Referer}i %{X-Forwarded-For}i %b'X-Forwarded-For를 인식하지 못하는 경우, X-Original-Forwarded-For를 사용server: port: {port} tomcat: use-relative-redirects: true basedir: . accesslog: enabled: true patte..
2024.12.29 -
Nginx proxy에서 client IP를 backend에 전달하기
server { listen 443 ssl; listen [::]:443 ssl; server_name www.test.co.kr; client_max_body_size 0; location / { proxy_pass http://spring-boot-service; # Forward headers proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme..
2024.12.29