@isomorphic-git/cors-proxy
Advanced tools
Comparing version 2.5.0 to 2.6.0
@@ -42,2 +42,3 @@ 'use strict' | ||
'x-github-request-id', | ||
'x-redirected-url', | ||
] | ||
@@ -112,2 +113,7 @@ const allowMethods = [ | ||
// GitHub uses user-agent sniffing for git/* and changes its behavior which is frustrating | ||
if (!headers['user-agent'] || !headers['user-agent'].startsWith('git/')) { | ||
headers['user-agent'] = 'git/@isomorphic-git/cors-proxy' | ||
} | ||
let p = u.path | ||
@@ -133,2 +139,5 @@ let parts = p.match(/\/([^\/]*)\/(.*)/) | ||
} | ||
if (f.redirected) { | ||
res.setHeader('x-redirected-url', f.url) | ||
} | ||
} | ||
@@ -135,0 +144,0 @@ f.body.pipe(res) |
{ | ||
"name": "@isomorphic-git/cors-proxy", | ||
"version": "2.5.0", | ||
"version": "2.6.0", | ||
"description": "Proxy clone and push requests for the browser", | ||
@@ -26,3 +26,3 @@ "main": "index.js", | ||
"minimisted": "^2.0.0", | ||
"node-fetch": "^2.3.0", | ||
"node-fetch": "^2.6.0", | ||
"tree-kill": "^1.2.1" | ||
@@ -29,0 +29,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15124
278
Updatednode-fetch@^2.6.0