mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-04 19:59:54 +08:00
feat: header x-app -> server
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -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];
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user