|
|
@@ -4,6 +4,8 @@ import { ConfigService } from '@nestjs/config';
|
|
|
import helmet from 'helmet';
|
|
|
import compression from 'compression';
|
|
|
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
|
|
|
+import * as path from 'path';
|
|
|
+import * as express from 'express';
|
|
|
|
|
|
import { AppModule } from './app.module';
|
|
|
|
|
|
@@ -40,6 +42,14 @@ async function bootstrap() {
|
|
|
credentials: true,
|
|
|
});
|
|
|
|
|
|
+ // Serve static images
|
|
|
+ app.use(
|
|
|
+ '/images',
|
|
|
+ express.static(
|
|
|
+ path.resolve(process.env.IMAGE_ROOT_PATH || '/data/box-images'),
|
|
|
+ ),
|
|
|
+ );
|
|
|
+
|
|
|
// 👇 Important: this makes /health become /api/v1/health
|
|
|
app.setGlobalPrefix('api/v1', {
|
|
|
exclude: ['/'],
|