fix: HIT today retrieve error #3713 (#3714)

This commit is contained in:
Honglin Mu
2020-01-14 11:44:13 +08:00
committed by DIYgod
parent 93167c346a
commit 6335d0831d
+8 -2
View File
@@ -36,9 +36,15 @@ module.exports = async (ctx) => {
return Promise.resolve(JSON.parse(cache));
}
const response = await got.get(link);
const response = await got({
method: 'get',
url: link,
headers: {
Referer: host,
},
});
if (response.request.res.connection._host === 'ids.hit.edu.cn') {
if (response.req._headers.host === 'ids.hit.edu.cn') {
const single = {
pubDate: new Date(
link