fix(core/utils): invalid request header Server (#9582)

Signed-off-by: Rongrong <15956627+Rongronggg9@users.noreply.github.com>
This commit is contained in:
Rongrong
2022-04-20 22:32:46 +08:00
committed by GitHub
parent 645e532092
commit 0522c63d5f
2 changed files with 0 additions and 4 deletions

View File

@@ -102,9 +102,6 @@ const requestWrapper = (url, options) => {
options.headers['user-agent'] = config.ua; options.headers['user-agent'] = config.ua;
} }
// server
options.headers.server = 'RSSHub';
try { try {
const urlHandler = new URL(url); const urlHandler = new URL(url);
// referer // referer

View File

@@ -43,7 +43,6 @@ describe('got', () => {
.get(/.*/) .get(/.*/)
.times(3) .times(3)
.reply(function () { .reply(function () {
expect(this.req.headers.server).toBe('RSSHub');
expect(this.req.headers.referer).toBe('http://api.rsshub.test'); expect(this.req.headers.referer).toBe('http://api.rsshub.test');
expect(this.req.headers.host).toBe('api.rsshub.test'); expect(this.req.headers.host).toBe('api.rsshub.test');
return [200, simpleResponse]; return [200, simpleResponse];