【文件属性】:
文件名称:proxy:HTTP请求代理,CORS跨域请求,HTTPS支持(cors-anywhere)
文件大小:14KB
文件格式:ZIP
更新时间:2021-04-28 00:57:42
proxy http-proxy cors-anywhere JavaScript
English |
代理人
HTTP请求代理,CORS跨域请求,HTTPS支持
功能
支持跨域请求(转换不支持跨域请求的接口),并直接启动ajax,fetch
支持HTTPS(解决远程数据接口不支持HTTPS)
用
主机/ {URL}
// Copy to the console to run
var $url = "wthrcdn.etouch.cn/weather_mini?citykey=101040100" ;
fetch ( "https://netnr-proxy.azurewebsites.net/" + $url ) . then ( x => x . json ( ) ) . then ( console . log )
跑步
yarn # Installation package
npm start # start
node app.js
PORT
【文件预览】:
proxy-main
----.gitattributes(2KB)
----yarn.lock(1KB)
----README_zh-CN.md(851B)
----favicon.ico(17KB)
----app.js(19KB)
----LICENSE(1KB)
----README.md(936B)
----.gitignore(5KB)
----package.json(678B)