import { bootstrap } from 'global-agent' ; import { HttpService } from '@nestjs/axios' ; import { Injectable } from '@nestjs/common' ; import { LoggerService } from '@fc/logger' ; @ Injectable ( ) export class HttpProxyService { constructor ( private readonly logger , private readonly httpService ) { this . logger . setContext ( this . constructor . name ) ; } see https onModuleInit ( ) { bootstrap ( ) ; this . logger . debug ( `Set up HTTPS proxy to: ${ globalThis [ 'GLOBAL_AGENT' ] . HTTPS_PROXY }` ) ; this . httpService . axiosRef . defaults . proxy = false ; } }