Skip to content

Commit

Permalink
feat: Add Helmet for enhanced HTTP security headers
Browse files Browse the repository at this point in the history
  • Loading branch information
Gi-jutsu committed Dec 5, 2024
1 parent a08859f commit 853460d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"class-validator": "^0.14.1",
"cookie-parser": "^1.4.7",
"drizzle-orm": "^0.36.4",
"helmet": "^8.0.0",
"jsonwebtoken": "^9.0.2",
"luxon": "^3.5.0",
"nestjs-cls": "^4.4.1",
Expand Down
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { ValidationPipe } from "@nestjs/common";
import { NestFactory } from "@nestjs/core";
import cookieParser from "cookie-parser";
import helmet from "helmet";
import { fileURLToPath } from "node:url";
import { ApplicationModule } from "./application.module.js";

export async function bootstrap() {
const application = await NestFactory.create(ApplicationModule);
application.use(helmet());
application.enableShutdownHooks();
application.use(cookieParser());
application.useGlobalPipes(new ValidationPipe());
Expand Down

0 comments on commit 853460d

Please sign in to comment.