Browse Source

Merge f961ab3502 into f31fac76f9

pull/6581/merge
Matt Van Horn 3 days ago
committed by GitHub
parent
commit
971b69bf6c
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      apps/api/src/main.ts

6
apps/api/src/main.ts

@ -18,10 +18,16 @@ import type { NestExpressApplication } from '@nestjs/platform-express';
import cookieParser from 'cookie-parser'; import cookieParser from 'cookie-parser';
import { NextFunction, Request, Response } from 'express'; import { NextFunction, Request, Response } from 'express';
import helmet from 'helmet'; import helmet from 'helmet';
import { EnvHttpProxyAgent, setGlobalDispatcher } from 'undici';
import { AppModule } from './app/app.module'; import { AppModule } from './app/app.module';
import { environment } from './environments/environment'; import { environment } from './environments/environment';
// Route Node's global `fetch` (used by all data-provider services) through
// HTTP_PROXY / HTTPS_PROXY when those env vars are set. Native fetch
// otherwise ignores them. EnvHttpProxyAgent reads NO_PROXY natively.
setGlobalDispatcher(new EnvHttpProxyAgent());
async function bootstrap() { async function bootstrap() {
const configApp = await NestFactory.create(AppModule); const configApp = await NestFactory.create(AppModule);
const configService = configApp.get<ConfigService>(ConfigService); const configService = configApp.get<ConfigService>(ConfigService);

Loading…
Cancel
Save