farcasterxyz / hub-monorepo

Implementation of the Farcaster Hub specification and supporting libraries for building applications on Farcaster
https://www.thehubble.xyz
MIT License
708 stars 404 forks source link

fix: Ignore rate limits for local/loopback IP traffic #2331

Closed sds closed 1 month ago

sds commented 1 month ago

Why is this change needed?

When using a proxy in front of the hub you'll get rate limit errors even though the traffic is coming from different IPs.

Until we support the X-Forwarded-For, this is a quick way to unblock the use of reverse proxies like nginx or Caddy.

Related to #1721.

Merge Checklist


PR-Codex overview

This PR focuses on enhancing the rate limiting functionality to ignore rate limits for local loopback traffic, specifically allowing requests from 127.0.0.1 without restrictions.

Detailed summary

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hub-monorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 25, 2024 5:13pm
changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: 090be5726c3f521df5e92e0dd599e2d1a9c2c0f2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ----------------- | ----- | | @farcaster/hubble | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR