fix: host in headers after redirecting request (#4717)

This commit is contained in:
Mitt
2020-05-11 18:35:08 +08:00
committed by GitHub
parent 1091f4ce04
commit f7a1380dac

View File

@@ -105,11 +105,6 @@ const requestWrapper = (url, options) => {
const urlHandler = new URL(url);
options.headers.referer = urlHandler.origin;
}
// host
if (!options.headers.host && !options.headers.Host) {
const urlHandler = new URL(url);
options.headers.host = urlHandler.host;
}
} catch (e) {
// do nothing
}