Ver Fonte

fix(server): increase json body payload limit (#941)

Jason Rasmussen há 2 anos atrás
pai
commit
8a9b0347bb
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      server/apps/immich/src/main.ts

+ 2 - 0
server/apps/immich/src/main.ts

@@ -8,12 +8,14 @@ import path from 'path';
 import { AppModule } from './app.module';
 import { serverVersion } from './constants/server_version.constant';
 import { RedisIoAdapter } from './middlewares/redis-io.adapter.middleware';
+import { json } from 'body-parser';
 
 async function bootstrap() {
   const app = await NestFactory.create<NestExpressApplication>(AppModule);
 
   app.set('trust proxy');
   app.use(cookieParser());
+  app.use(json({ limit: '10mb' }));
   if (process.env.NODE_ENV === 'development') {
     app.enableCors();
   }