mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-07-14 16:51:10 +00:00
bulljobs don't respect common headers
added the common truth (user-agent.ts) to all bulljob services
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
import axios, { AxiosInstance } from 'axios';
|
||||
import { RMAB_USER_AGENT } from '../utils/user-agent';
|
||||
import https from 'https';
|
||||
import path from 'path';
|
||||
import { DOWNLOAD_CLIENT_TIMEOUT } from '../constants/download-timeouts';
|
||||
@@ -50,7 +51,7 @@ export class DelugeService implements IDownloadClient {
|
||||
? new https.Agent({ rejectUnauthorized: false }) : undefined;
|
||||
if (httpsAgent) logger.info('[Deluge] SSL certificate verification disabled');
|
||||
|
||||
this.client = axios.create({ baseURL: this.baseUrl, timeout: DOWNLOAD_CLIENT_TIMEOUT, httpsAgent });
|
||||
this.client = axios.create({ baseURL: this.baseUrl, timeout: DOWNLOAD_CLIENT_TIMEOUT, httpsAgent, headers: { 'User-Agent': RMAB_USER_AGENT } });
|
||||
}
|
||||
|
||||
/** JSON-RPC call with automatic re-authentication on auth failure */
|
||||
|
||||
Reference in New Issue
Block a user