[PR #8617] [MERGED] fix: misleading rate limit IP warning #25001

Closed
opened 2026-04-15 22:41:06 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/8617
Author: @GautamBytes
Created: 3/15/2026
Status: Merged
Merged: 3/16/2026
Merged by: @himself65

Base: canaryHead: fix/rate-limit-warning


📝 Commits (2)

  • 5aa3c81 Fix misleading rate limit IP warning
  • fba1b2b Fix rate limit warning cleanup test

📊 Changes

2 files changed (+45 additions, -1 deletions)

View changed files

📝 packages/better-auth/src/api/rate-limiter/index.ts (+1 -1)
📝 packages/better-auth/src/api/rate-limiter/rate-limiter.test.ts (+44 -0)

📄 Description

Summary

  • update the rate-limit warning to point users to advanced.ipAddress.ipAddressHeaders
  • keep rate-limit and IP resolution behavior unchanged
  • add a regression test for the missing-client-IP path outside dev/test

Closes #8615.


Summary by cubic

Fixes the rate-limit IP warning to point users to configure client IP headers via advanced.ipAddress.ipAddressHeaders. Behavior is unchanged; guidance corrected and tests hardened.

  • Bug Fixes
    • Updated warning to reference forwarding a trusted client IP header and advanced.ipAddress.ipAddressHeaders.
    • Added production regression test for missing client IP, ensured no 429 is returned, removed the trustedProxies hint, and fixed test cleanup to reset env and modules.

Written for commit fba1b2b1a9. Summary will update on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/8617 **Author:** [@GautamBytes](https://github.com/GautamBytes) **Created:** 3/15/2026 **Status:** ✅ Merged **Merged:** 3/16/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `fix/rate-limit-warning` --- ### 📝 Commits (2) - [`5aa3c81`](https://github.com/better-auth/better-auth/commit/5aa3c8171836458d2f306f89e03daefb76b152f2) Fix misleading rate limit IP warning - [`fba1b2b`](https://github.com/better-auth/better-auth/commit/fba1b2b1a9356668fbeb0c4438aaef1d2ead9512) Fix rate limit warning cleanup test ### 📊 Changes **2 files changed** (+45 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/rate-limiter/index.ts` (+1 -1) 📝 `packages/better-auth/src/api/rate-limiter/rate-limiter.test.ts` (+44 -0) </details> ### 📄 Description ## Summary - update the rate-limit warning to point users to `advanced.ipAddress.ipAddressHeaders` - keep rate-limit and IP resolution behavior unchanged - add a regression test for the missing-client-IP path outside dev/test Closes #8615. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes the rate-limit IP warning to point users to configure client IP headers via `advanced.ipAddress.ipAddressHeaders`. Behavior is unchanged; guidance corrected and tests hardened. - **Bug Fixes** - Updated warning to reference forwarding a trusted client IP header and `advanced.ipAddress.ipAddressHeaders`. - Added production regression test for missing client IP, ensured no 429 is returned, removed the `trustedProxies` hint, and fixed test cleanup to reset env and modules. <sup>Written for commit fba1b2b1a9356668fbeb0c4438aaef1d2ead9512. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 22:41:06 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#25001