fix: exempt health endpoint from rate limiting
All checks were successful
ci/woodpecker/push/api Pipeline was successful

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 <noreply@anthropic.com>
This commit is contained in:
2026-02-16 03:21:46 -06:00
parent 444fa1116a
commit e2ffaa71b1

View File

@@ -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<ApiResponse<HealthStatus>> {
const dbHealthy = await this.prisma.isHealthy();
const dbInfo = await this.prisma.getConnectionInfo();