chore: do not use proxy for MFP urls
This commit is contained in:
parent
e1c727b7de
commit
280abc4dea
1 changed files with 6 additions and 2 deletions
|
|
@ -104,7 +104,7 @@ export class Fetcher {
|
|||
}
|
||||
|
||||
protected async fetchWithTimeout(ctx: Context, url: URL, requestConfig?: CustomRequestConfig, tryCount = 0): Promise<AxiosResponse> {
|
||||
const proxyUrl = this.getProxyForUrl(url);
|
||||
const proxyUrl = this.getProxyForUrl(ctx, url);
|
||||
|
||||
let message = `Fetch ${requestConfig?.method ?? 'GET'} ${url}`;
|
||||
/* istanbul ignore if */
|
||||
|
|
@ -319,7 +319,11 @@ export class Fetcher {
|
|||
return new Promise(sleep => setTimeout(sleep, ms));
|
||||
}
|
||||
|
||||
private getProxyForUrl(url: URL): URL | undefined {
|
||||
private getProxyForUrl(ctx: Context, url: URL): URL | undefined {
|
||||
if (ctx.config.mediaFlowProxyUrl && url.href.startsWith(ctx.config.mediaFlowProxyUrl)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const proxyConfig = process.env['PROXY_CONFIG'];
|
||||
|
||||
if (proxyConfig) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue