Skip to content

Forward user's remote IP from SSR server -> Refresh server #224

Open

Description

@Toastbrot236

Currently, the SSR server gets rate-limited by Refresh if too many users try to use the website at the same time, resulting in some recent cases where Bonsai's website would become unresponsive or show nothing even if the user hasn't spammed any endpoint (this is also why this issue is marked as a bug). Since Refresh only knows about the SSR server's own IP, it gets treated like any other API client. We should add a way for the SSR server to forward the actual user's IP address, and for Refresh to use that IP instead of the real remote IP for rate-limiting.

Refresh should only use the forwarded IP address on clients from the same infrastructure though, to prevent any API client from just circumventing rate-limiting. This could be done by using a shared secret, or by ensuring the client has the same IP address as the Refresh server itself.

Activity

  1. added this to the 3.8.0 Release milestone on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions