@isomorphic-git/cors-proxy
Advanced tools
Comparing version 2.7.0 to 2.7.1
@@ -38,2 +38,3 @@ 'use strict' | ||
'last-modified', | ||
'location', | ||
'pragma', | ||
@@ -129,2 +130,3 @@ 'server', | ||
method: req.method, | ||
redirect: 'manual', | ||
headers, | ||
@@ -134,2 +136,7 @@ body: (req.method !== 'GET' && req.method !== 'HEAD') ? req : undefined | ||
).then(f => { | ||
if (f.headers.has('location')) { | ||
// Modify the location so the client continues to use the proxy | ||
let newUrl = f.headers.get('location').replace(/^https?:\//, '') | ||
f.headers.set('location', newUrl) | ||
} | ||
res.statusCode = f.status | ||
@@ -136,0 +143,0 @@ for (let h of exposeHeaders) { |
{ | ||
"name": "@isomorphic-git/cors-proxy", | ||
"version": "2.7.0", | ||
"version": "2.7.1", | ||
"description": "Proxy clone and push requests for the browser", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
15569
286