Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using the Bluesky API from Cloudflare workers doesn't work due to IP rate limits #3388

Open
treeder opened this issue Jan 17, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@treeder
Copy link

treeder commented Jan 17, 2025

Describe the bug

Cloudflare workers across all customers use the same IP ranges so when I run my code on Cloudflare, I get the RateLimitExceeded error every time I call createSession.

Cloudflare IP ranges: https://www.cloudflare.com/ips/

To Reproduce

Run this on a Cloudflare worker or pages site:

let host = 'https://bsky.social/xrpc'
let r = await fetch(`${host}/com.atproto.server.createSession`, {
    method: 'POST',
    body: {
      identifier: `${this.opts.username}`,
      password: this.opts.password,
    }
  })

Expected behavior

Not to get rate limited. This makes using Bluesky impossible if you're using Cloudflare infrastructure.

Perhaps if we're performing authentication or using a JWT in subsequent calls, the rate limiting should apply to those credentials rather than IP addresses.

And/or do not apply those rate limits to the Cloudflare IP ranges.

@treeder treeder added the bug Something isn't working label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant