报错信息:file:///G:/api/getInofo/: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
我nginx代理要把file:///G:代理到http://easytest.com/ 请问下面要要怎么配置
server {
listen 3000;
server_name localhost;
root G:/express/webapps;
charset utf-8;
limit_conn perip 5; #调用nginx对象属性并赋值
limit_rate 2k; #调用nginx对象属性并赋值
#location zlpt/api/ {
#rewrite /zlpt(/.*) $1 break;
#proxy_connect_timeout 9999;
#proxy_send_timeout 9999;
#proxy_read_timeout 9999;
#proxy_pass http://192.168.15.53:8080;
#}
}
1.设置hosts file:
127.0.0.1 easytest.com
2.再配置NGINX