diff --git a/lib/utils/request-wrapper.js b/lib/utils/request-wrapper.js index 01d02a8cc..7e36c77d9 100644 --- a/lib/utils/request-wrapper.js +++ b/lib/utils/request-wrapper.js @@ -77,7 +77,7 @@ const requestWrapper = (url, options) => { } options.headers['user-agent'] = config.ua; } - options.headers['x-app'] = 'RSSHub'; + options.headers.server = 'RSSHub'; }; const httpWrap = (func) => { diff --git a/test/utils/request-wrapper.js b/test/utils/request-wrapper.js index 1577f7993..a42e35c93 100644 --- a/test/utils/request-wrapper.js +++ b/test/utils/request-wrapper.js @@ -38,7 +38,7 @@ describe('got', () => { .get('/test') .times(2) .reply(function() { - expect(this.req.headers['x-app']).toBe('RSSHub'); + expect(this.req.headers.server).toBe('RSSHub'); return [200, simpleResponse]; });