Skip to content
/ proxy Public
forked from netnr/proxy

HTTP请求代理,CORS跨域请求,HTTPS支持(cors-anywhere)

License

Notifications You must be signed in to change notification settings

DarkiT/proxy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 = "https://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

About

HTTP请求代理,CORS跨域请求,HTTPS支持(cors-anywhere)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 84.8%
  • HTML 15.2%