mirror of
https://github.com/d0zingcat/cors-anywhere.git
synced 2026-05-13 15:09:25 +00:00
Fix POST -> GET conversion on redirect
This commit is contained in:
@@ -141,6 +141,8 @@ function onProxyResponse(req, res, response) {
|
||||
res.setHeader('X-CORS-Redirect-' + requestState.redirectCount_, statusCode + ' ' + locationHeader);
|
||||
|
||||
req.method = 'GET';
|
||||
req.headers['content-length'] = '0';
|
||||
delete req.headers['content-type'];
|
||||
requestState.location = parseURL(locationHeader);
|
||||
|
||||
// ### Dispose the current proxied request
|
||||
|
||||
Reference in New Issue
Block a user