Nginx Issue nginx处理redirect location端口丢失的问题 反向代理 proxy_set_header Host $http_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; 访问目录没带/ if (-d $request_filename) { rewrite [^/]$ $scheme://$http_host$uri/ permanent; } 跨域访问CORS add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'; add_header 'Access-Control-Allow-Credentials' 'true'; 上传文件 client_max_body_size 64m;