mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-05 12:21:31 +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['user-agent'] = config.ua;
|
||||||
}
|
}
|
||||||
options.headers['x-app'] = 'RSSHub';
|
options.headers.server = 'RSSHub';
|
||||||
};
|
};
|
||||||
|
|
||||||
const httpWrap = (func) => {
|
const httpWrap = (func) => {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ describe('got', () => {
|
|||||||
.get('/test')
|
.get('/test')
|
||||||
.times(2)
|
.times(2)
|
||||||
.reply(function() {
|
.reply(function() {
|
||||||
expect(this.req.headers['x-app']).toBe('RSSHub');
|
expect(this.req.headers.server).toBe('RSSHub');
|
||||||
return [200, simpleResponse];
|
return [200, simpleResponse];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user