mirror of
https://github.com/d0zingcat/cors-anywhere.git
synced 2026-05-21 23:16:51 +00:00
@@ -182,6 +182,9 @@ var getHandler = exports.getHandler = function(options) {
|
||||
delete req.headers[header];
|
||||
});
|
||||
|
||||
// Only add port if it was explicitly set
|
||||
req.headers.host = host + (match[4] ? ':' + port : '');
|
||||
|
||||
proxyRequest(req, res, proxy, full_url, {
|
||||
host: hostname,
|
||||
port: port
|
||||
@@ -197,7 +200,6 @@ var createServer = exports.createServer = function(options) {
|
||||
|
||||
// Default options:
|
||||
var httpProxyOptions = {
|
||||
changeOrigin: true, // Change Host request header to match the requested URL instead of the proxy's URL.
|
||||
xforward: {
|
||||
enable: true // Append X-Forwarded-* headers
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cors-anywhere",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"description": "CORS Anywhere is a reverse proxy which adds CORS headers to the proxied request. Request URL is taken from the path",
|
||||
"license": "MIT",
|
||||
"author": "Rob W <gwnRob@gmail.com>",
|
||||
|
||||
Reference in New Issue
Block a user