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