feat: add cors
This commit is contained in:
parent
278d63bf8d
commit
f83aaec778
|
@ -4,7 +4,7 @@ import {
|
|||
NestFastifyApplication,
|
||||
} from '@nestjs/platform-fastify';
|
||||
import { AppModule } from './app.module';
|
||||
import { ConsoleLogger, LoggerService, ValidationPipe } from '@nestjs/common';
|
||||
import { ValidationPipe } from '@nestjs/common';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { Logger } from 'nestjs-pino';
|
||||
|
||||
|
@ -16,8 +16,9 @@ async function bootstrap() {
|
|||
);
|
||||
|
||||
const logger = app.get(Logger);
|
||||
app.useLogger(logger);
|
||||
|
||||
app.useLogger(logger);
|
||||
app.enableCors();
|
||||
app.useGlobalPipes(
|
||||
new ValidationPipe({
|
||||
whitelist: true,
|
||||
|
|
Loading…
Reference in New Issue
Block a user