Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Ignore local/loopback traffic in IP connection limiter (#2335)
## Why is this change needed? This allows the use of reverse proxies. ## Merge Checklist - [x] PR title adheres to the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) standard - [x] PR has a [changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets) - [x] PR has been tagged with a change label(s) (i.e. documentation, feature, bugfix, or chore) - [x] PR includes [documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs) if necessary. <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on enhancing the connection limiting functionality by ignoring local loopback IP traffic and modifying a test case. ### Detailed summary - Updated `rateLimits.ts` to ignore both `127.0.0.1` and `::1` for local loopback traffic. - Changed the connection limit check in `server.ts` to exclude local IPs from the limit enforcement. - Modified the test in `eventService.test.ts` to skip the test case for excessive subscriptions. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
- Loading branch information