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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 5 deletions

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
}