Skip to content
HTTP请求代理,CORS跨域请求,HTTPS支持(cors-anywhere)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
.gitignore
CNAME
LICENSE
README.md
favicon.ico
favicon.svg
index.html
package.json
server.js

README.md

proxy

HTTP请求代理,CORS跨域请求,HTTPS支持

作用

  • 支持跨域请求(转换不支持跨域请求的接口),可直接发起 ajax、fetch
  • 支持HTTPS(解决远程数据接口不支持HTTPS)

接口

使用

拷贝到控制台运行

fetch("https://proxy.zme.ink/https://www.google.com")
	.then(x => x.text())
	.then(function (data) {
		console.log(data);
	})

var $url = "http://wthrcdn.etouch.cn/weather_mini?citykey=101040100";
fetch("https://proxy.zme.ink/" + $url)
	.then(x => x.text())
	.then(function (data) {
		console.log(data);
	})

安装

  • npm install
  • node server.js

Fork

Source

You can’t perform that action at this time.