From e2ffaa71b10bac9b43ee792982eabffa6ee6ab7f Mon Sep 17 00:00:00 2001 From: Jason Woltje Date: Mon, 16 Feb 2026 03:21:46 -0600 Subject: [PATCH] fix: exempt health endpoint from rate limiting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Docker/load-balancer health probes hit GET /health every ~5s from 127.0.0.1, exhausting the rate limit and causing all subsequent checks to return 429 — making the service appear unhealthy. Co-Authored-By: Claude Opus 4.6 --- apps/api/src/app.controller.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/api/src/app.controller.ts b/apps/api/src/app.controller.ts index f50dec2..5565a4e 100644 --- a/apps/api/src/app.controller.ts +++ b/apps/api/src/app.controller.ts @@ -1,4 +1,5 @@ import { Controller, Get } from "@nestjs/common"; +import { SkipThrottle } from "@nestjs/throttler"; import { AppService } from "./app.service"; import { PrismaService } from "./prisma/prisma.service"; import type { ApiResponse, HealthStatus } from "@mosaic/shared"; @@ -17,6 +18,7 @@ export class AppController { } @Get("health") + @SkipThrottle() async getHealth(): Promise> { const dbHealthy = await this.prisma.isHealthy(); const dbInfo = await this.prisma.getConnectionInfo();