Note for nginx

转发header

  • server 设置转发原始IP
    1
    2
    3
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-Server $host;
  • 如果 header name 中包含下划线,在 http 部分增加 underscores_in_headers on; 配置