1 Star 0 Fork 0

codezm/cors-anywhere

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
cors-index.js 491 Bytes
一键复制 编辑 原始数据 按行查看 历史
root 提交于 2023-12-13 12:03 +08:00 . first init
var host = '0.0.0.0';
var port = '8000';
var cors_proxy = require('cors-anywhere');
var http = cors_proxy.createServer({
originWhitelist: [], // Allow all origins
requireHeader: ['origin', 'x-requested-with'],
removeHeaders: ['cookie', 'cookie2'],
handleInitialRequest: (req, res, location) => {
console.log(req.rawHeaders, location.href, req.method)
}
}).listen(port, host, function() {
console.log('Running CORS Anywhere on ' + host + ':' + port);
});
console.log(http);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/codezm/cors-anywhere.git
git@gitee.com:codezm/cors-anywhere.git
codezm
cors-anywhere
cors-anywhere
master

搜索帮助