Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Commit

Permalink
fix: helmet is back (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiejaoude committed Jul 23, 2021
1 parent 226a8b5 commit 23418c3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ import { NestFactory } from '@nestjs/core';
import { SwaggerModule } from '@nestjs/swagger';
import { AppModule } from './app.module';
import { swaggerConfig } from './swagger';
import * as helmet from 'helmet';

async function bootstrap() {
const app = await NestFactory.create(AppModule);

app.useGlobalPipes(new ValidationPipe({ transform: true }));
app.use(helmet());

const document = SwaggerModule.createDocument(app, swaggerConfig);
SwaggerModule.setup('swagger', app, document);
Expand Down

0 comments on commit 23418c3

Please sign in to comment.