Skip to content

Stop Cachet API routes inheriting the host application rate limiter#375

Merged
jbrooksuk merged 1 commit into
mainfrom
claude/api-rate-limit-60-bug-m9lkau
Jul 8, 2026
Merged

Stop Cachet API routes inheriting the host application rate limiter#375
jbrooksuk merged 1 commit into
mainfrom
claude/api-rate-limit-60-bug-m9lkau

Conversation

@jbrooksuk

@jbrooksuk jbrooksuk commented Jul 8, 2026

Copy link
Copy Markdown
Member

Closes #311

The API routes were registered with both the "cachet:api" middleware
group and "throttle:cachet-api". The "cachet:api" group defaulted to the
host application's "api" middleware group, which typically registers its
own "throttle:api" limiter (Laravel's default is 60 requests a minute).

Both throttles were applied, so the more restrictive host limiter capped
requests at 60 and its value was reported in the X-RateLimit-Limit
header, ignoring both the CACHET_API_RATE_LIMIT setting and the intended
default of 300.

Default "cachet.api_middleware" to SubstituteBindings only, so Cachet's
API relies solely on its own "throttle:cachet-api" limiter while keeping
route model binding working.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01TKAFhcTL68GptC9YTU2qi9

The API routes were registered with both the "cachet:api" middleware
group and "throttle:cachet-api". The "cachet:api" group defaulted to the
host application's "api" middleware group, which typically registers its
own "throttle:api" limiter (Laravel's default is 60 requests a minute).

Both throttles were applied, so the more restrictive host limiter capped
requests at 60 and its value was reported in the X-RateLimit-Limit
header, ignoring both the CACHET_API_RATE_LIMIT setting and the intended
default of 300.

Default "cachet.api_middleware" to SubstituteBindings only, so Cachet's
API relies solely on its own "throttle:cachet-api" limiter while keeping
route model binding working.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TKAFhcTL68GptC9YTU2qi9
@jbrooksuk jbrooksuk merged commit 0ef52fb into main Jul 8, 2026
24 checks passed
@jbrooksuk jbrooksuk deleted the claude/api-rate-limit-60-bug-m9lkau branch July 8, 2026 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API rate limit setting not being applied

2 participants