84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
If the backend interface is set to restrict domain name access, can I request data by pretending to be the other party's domain name or IP through node or ajax?
You can configure a reverse proxy through niginx to solve cross-domain problems
In this case, ajax’s jsonp will not work. You can forward it through node middleware
middleware: [ // 请求代理,按需设置 proxy('/api', { target: 'http://op.juhe.cn', // 目标地址 changeOrigin: true, ws: true, //websocket pathRewrite: { '^/api': '' //重写地址 } }) ]
You can configure a reverse proxy through niginx to solve cross-domain problems
In this case, ajax’s jsonp will not work. You can forward it through node middleware