mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-04 19:59:54 +08:00
fix: host in headers after redirecting request (#4717)
This commit is contained in:
@@ -105,11 +105,6 @@ const requestWrapper = (url, options) => {
|
|||||||
const urlHandler = new URL(url);
|
const urlHandler = new URL(url);
|
||||||
options.headers.referer = urlHandler.origin;
|
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) {
|
} catch (e) {
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user