From 11d38504d835184977ea11b815cb962b4cd3a652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milorad=20FIlipovi=C4=87?= Date: Wed, 26 Nov 2025 14:31:12 +0100 Subject: [PATCH] fix(core): Update posthog proxy (no-changelog) (#22328) --- packages/cli/src/controllers/posthog.controller.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/controllers/posthog.controller.ts b/packages/cli/src/controllers/posthog.controller.ts index f4f4d6619c7..8d0a6415386 100644 --- a/packages/cli/src/controllers/posthog.controller.ts +++ b/packages/cli/src/controllers/posthog.controller.ts @@ -72,7 +72,7 @@ export class PostHogController { return await this.proxy(req, res, next); } - // Static files - specific endpoint for array.js + // Static files - specific endpoint for array.js and lazy-recorder.js @Get('/static/array.js', { skipAuth: true, usesTemplates: true, @@ -82,6 +82,15 @@ export class PostHogController { void this.proxy(req, res, next); } + @Get('/static/lazy-recorder.js', { + skipAuth: true, + usesTemplates: true, + rateLimit: { limit: 50, windowMs: 60_000 }, + }) + staticLazyRecorderJs(req: AuthenticatedRequest, res: Response, next: NextFunction) { + void this.proxy(req, res, next); + } + // Configuration endpoints for array.js @Get('/array/:apiKey/config.js', { skipAuth: true,