
proxy_set_header는 NGINX의 proxy_pass와 함께 사용하여 요청 헤더를 변경할 수 있습니다.
proxy_set_header "header_name" "header_value";
예를 들어, User-Agent 헤더를 변경하고 싶다면 다음과 같이 사용할 수 있습니다.
proxy_set_header User-Agent "Mozilla/5.0";
또는, 요청 헤더를 전달받은 후 변경하고 싶다면 다음과 같이 사용할 수 있습니다.
proxy_pass http://example.com;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
이러한 예제를 통해 proxy_set_header의 사용법을 이해할 수 있습니다.
2025-08-04 10:49