nginx配置接口跨域请求

server {

listen 8017;

#server_name anitt.cn;

# Vue路由模式为history需添加的配置

location / {

if (tomcat的catalina太大!-e $request_filenalinux系统安装me) {

rewrite ^(.*)$ /index.html?s=$1 last;

break;

}

root /opt/toncent系统运维工程师soft/tomcat/QRCodeByHud/;

index index.html;

}

location /txhud/ {

proxy_pass http://ip:8tomcat085/business/versionFileUplohtml标签属性大全ad/getApkPath;

}

# 以html文件怎么打开上为完整版需要加的反向代理转发路径规则

# 获取真实IP以及Websocket需linux系统添加的配置

proxy_set_header Host $host;

proxy_set_hhtmleader X-Real-I反向代理原理P $remote_addr;

proxy_set_header REMOTE-HOST $remote_addr;

proxy_set_header X-Forwarded-反向代理原理For $proxy_add_x_forwarded_for;

proxy_setlinux删除文件命令_header Upgrade $http_upgrade;

proxy_set_header Connection "upgrade";

# 客户html代码端Body大小限制(文件上传大小限制配置)

client_max_body_size 8m;

error_page 500 502 503 504 404 /50x.html;

location = /50x.html {

rolinuxot html;

}

}