Skip to content

Commit ff21e53

Browse files
authored
fix(nginx): correct real_ip_header typo X-Forward-For → X-Forwarded-For (#8935)
X-Forward-For is not a real HTTP header — the standard is X-Forwarded-For. With the typo, Nginx never replaces $remote_addr with the actual client IP, so rate limiting and IP logging see the proxy IP instead of the real client. Affects all three nginx configs (web, admin, space).
1 parent 9491bdb commit ff21e53

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

apps/admin/nginx/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ http {
1111

1212
set_real_ip_from 0.0.0.0/0;
1313
real_ip_recursive on;
14-
real_ip_header X-Forward-For;
14+
real_ip_header X-Forwarded-For;
1515
limit_req_zone $binary_remote_addr zone=mylimit:10m rate=10r/s;
1616

1717
access_log /dev/stdout;

apps/space/nginx/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ http {
1111

1212
set_real_ip_from 0.0.0.0/0;
1313
real_ip_recursive on;
14-
real_ip_header X-Forward-For;
14+
real_ip_header X-Forwarded-For;
1515
limit_req_zone $binary_remote_addr zone=mylimit:10m rate=10r/s;
1616

1717
access_log /dev/stdout;

apps/web/nginx/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ http {
1111

1212
set_real_ip_from 0.0.0.0/0;
1313
real_ip_recursive on;
14-
real_ip_header X-Forward-For;
14+
real_ip_header X-Forwarded-For;
1515
limit_req_zone $binary_remote_addr zone=mylimit:10m rate=10r/s;
1616

1717
access_log /dev/stdout;

0 commit comments

Comments
 (0)