mirror of
https://github.com/unraid/api.git
synced 2026-01-07 00:59:48 -06:00
chore: revert fastify change
This commit is contained in:
@@ -2,13 +2,9 @@ import type { NestFastifyApplication } from '@nestjs/platform-fastify';
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { FastifyAdapter } from '@nestjs/platform-fastify';
|
||||
|
||||
|
||||
|
||||
import fastifyCookie from '@fastify/cookie';
|
||||
import { LoggerErrorInterceptor, Logger as PinoLogger } from 'nestjs-pino';
|
||||
|
||||
|
||||
|
||||
import { apiLogger } from '@app/core/log.js';
|
||||
import { LOG_LEVEL, PORT } from '@app/environment.js';
|
||||
import { AppModule } from '@app/unraid-api/app/app.module.js';
|
||||
@@ -17,10 +13,6 @@ import { CookieService } from '@app/unraid-api/auth/cookie.service.js';
|
||||
import { GraphQLExceptionsFilter } from '@app/unraid-api/exceptions/graphql-exceptions.filter.js';
|
||||
import { HttpExceptionFilter } from '@app/unraid-api/exceptions/http-exceptions.filter.js';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export async function bootstrapNestServer(): Promise<NestFastifyApplication> {
|
||||
apiLogger.debug('Creating Nest Server');
|
||||
|
||||
@@ -31,7 +23,7 @@ export async function bootstrapNestServer(): Promise<NestFastifyApplication> {
|
||||
|
||||
const server = app.getHttpAdapter().getInstance();
|
||||
|
||||
await app.register(fastifyCookie as unknown as Parameters<NestFastifyApplication['register']>[0]); // parse cookies before cors
|
||||
await app.register(fastifyCookie); // parse cookies before cors
|
||||
|
||||
const cookieService = app.get(CookieService);
|
||||
app.enableCors(configureFastifyCors(cookieService));
|
||||
@@ -66,4 +58,4 @@ export async function bootstrapNestServer(): Promise<NestFastifyApplication> {
|
||||
apiLogger.info('Nest Server is now listening');
|
||||
|
||||
return app;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user