cors-proxy-with-https
Advanced tools
Comparing version 1.0.20 to 1.0.21
@@ -41,2 +41,15 @@ const https = require('https') | ||
}) | ||
}, (req, res, proxy) => { | ||
if (req.method === 'OPTIONS') { | ||
res.setHeader('Access-Control-Allow-Origin', '*') | ||
res.setHeader('Access-Control-Allow-Headers', '*') | ||
res.setHeader('Access-Control-Allow-Methods', '*') | ||
res.end() | ||
return; | ||
} | ||
proxy.web(req, res, { | ||
target: this.config.target, | ||
secure: true | ||
}) | ||
}).listen(8080); | ||
@@ -43,0 +56,0 @@ |
{ | ||
"name": "cors-proxy-with-https", | ||
"description": "Прокси для обхода CORS + поддержка HTTPS by devmkru", | ||
"version": "1.0.20", | ||
"version": "1.0.21", | ||
"main": "./lib", | ||
@@ -6,0 +6,0 @@ "bin": { |
5723
105