cdn NGINX获取真实ip

dependabot/npm_and_yarn/fir_admin/ws-5.2.3
youngS 3 years ago
parent 8c1ca01532
commit a5a79867f1
  1. 5
      fir_ser/nginx-vhost.conf

@ -34,8 +34,9 @@ server
# root /data/flyapp/fir_ser/; # root /data/flyapp/fir_ser/;
# rewrite ^/download/(.*) /files/$1 break; # rewrite ^/download/(.*) /files/$1 break;
# } # }
# 如果使用cdn,需要配置该选项
set_real_ip_from 0.0.0.0/0;
real_ip_header X-Forwarded-For;
location ~ ^/(download|api|files|udid|captcha) { location ~ ^/(download|api|files|udid|captcha) {
#proxy_pass http://synchrotron; #proxy_pass http://synchrotron;

Loading…
Cancel
Save