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,