|
|
|
@ -4,6 +4,8 @@ import clear from 'clear';
|
|
|
|
|
import * as express from 'express'; |
|
|
|
|
import NcToolGui from 'nc-lib-gui'; |
|
|
|
|
import { IoAdapter } from '@nestjs/platform-socket.io'; |
|
|
|
|
import requestIp from 'request-ip'; |
|
|
|
|
import cookieParser from 'cookie-parser'; |
|
|
|
|
import { AppModule } from './app.module'; |
|
|
|
|
|
|
|
|
|
import { NC_LICENSE_KEY } from './constants'; |
|
|
|
@ -102,6 +104,9 @@ export default class Noco {
|
|
|
|
|
|
|
|
|
|
nestApp.useWebSocketAdapter(new IoAdapter(httpServer)); |
|
|
|
|
|
|
|
|
|
nestApp.use(requestIp.mw()); |
|
|
|
|
nestApp.use(cookieParser()); |
|
|
|
|
|
|
|
|
|
nestApp.use( |
|
|
|
|
express.json({ limit: process.env.NC_REQUEST_BODY_SIZE || '50mb' }), |
|
|
|
|
); |
|
|
|
|