mirror of
https://github.com/immich-app/immich.git
synced 2024-11-16 02:18:50 -07:00
fix(server): increase json body payload limit (#941)
This commit is contained in:
parent
fe4b307fe6
commit
8a9b0347bb
@ -8,12 +8,14 @@ import path from 'path';
|
|||||||
import { AppModule } from './app.module';
|
import { AppModule } from './app.module';
|
||||||
import { serverVersion } from './constants/server_version.constant';
|
import { serverVersion } from './constants/server_version.constant';
|
||||||
import { RedisIoAdapter } from './middlewares/redis-io.adapter.middleware';
|
import { RedisIoAdapter } from './middlewares/redis-io.adapter.middleware';
|
||||||
|
import { json } from 'body-parser';
|
||||||
|
|
||||||
async function bootstrap() {
|
async function bootstrap() {
|
||||||
const app = await NestFactory.create<NestExpressApplication>(AppModule);
|
const app = await NestFactory.create<NestExpressApplication>(AppModule);
|
||||||
|
|
||||||
app.set('trust proxy');
|
app.set('trust proxy');
|
||||||
app.use(cookieParser());
|
app.use(cookieParser());
|
||||||
|
app.use(json({ limit: '10mb' }));
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
app.enableCors();
|
app.enableCors();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user