feat: header x-app -> server

This commit is contained in:
DIYgod
2019-08-15 23:14:48 +08:00
parent d6fccdeeac
commit eba8f46875
2 changed files with 2 additions and 2 deletions

View File

@@ -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) => {

View File

@@ -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];
});