diff --git a/lib/cors-anywhere.js b/lib/cors-anywhere.js index 3c8d730..83cf9be 100644 --- a/lib/cors-anywhere.js +++ b/lib/cors-anywhere.js @@ -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