|
|
@@ -34,7 +34,7 @@ async function bootstrap() {
|
|
|
|
|
|
// after creating fastifyAdapter but before NestFactory.create:
|
|
|
// Read allowed origin from env (fallback to '*')
|
|
|
- const corsOrg = process.env.APP_CORS_ORIGIN || '*';
|
|
|
+ const corsOrg = process.env.MGNT_CORS_ORIGIN || '*';
|
|
|
|
|
|
// await fastifyAdapter.register(fastifyStatic as any, {
|
|
|
// root: path.resolve(process.env.IMAGE_ROOT_PATH || '/data/box-images'),
|
|
|
@@ -77,11 +77,12 @@ async function bootstrap() {
|
|
|
|
|
|
const host =
|
|
|
configService.get<string>('MGNT_HOST') ??
|
|
|
- configService.get<string>('MGNT_HOST') ??
|
|
|
+ configService.get<string>('HOST') ??
|
|
|
'0.0.0.0';
|
|
|
|
|
|
const port =
|
|
|
- configService.get<number>('MGNT_PORT') ?? Number(process.env.PORT ?? 3300);
|
|
|
+ configService.get<number>('MGNT_PORT') ??
|
|
|
+ Number(process.env.MGNT_PORT ?? 3300);
|
|
|
|
|
|
const corsOrigin = configService.get<string>('MGNT_CORS_ORIGIN') ?? '*';
|
|
|
const corsOriginOption =
|