Key self-host auth rate limit on the real client IP - #2053
Draft
RhysSullivan wants to merge 3 commits into
Draft
RhysSullivan wants to merge 3 commits into
RhysSullivan wants to merge 3 commits into
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | d486c2b | Commit Preview URL Branch Preview URL |
Sep 18 2026, 07:36 PM |
Contributor
Cloudflare preview
Sign-in is Cloudflare Access (one-time PIN to an allowed email). The preview has its own database and encryption key; it is destroyed when this PR closes. |
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | d486c2b | Sep 18 2026, 07:37 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Better Auth's rate limiter only reads the client IP from headers, so a directly exposed self-host pooled every user into one sign-in bucket (3 per 10 s).
x-executor-client-ipbefore Better Auth sees the request, always overwriting any client-supplied value. Direct deployments get per-client limiting with no configuration.EXECUTOR_TRUSTED_PROXY_HEADER+EXECUTOR_TRUSTED_PROXIESfor reverse proxies (Caddy, nginx, Cloudflare). The proxy header is honoured only on connections from a listed address and stripped otherwise. Half-configured or malformed values refuse to boot.x-forwarded-foris no longer read on its own (any client could rotate it). A proxied instance shares one bucket until both variables are set; the server logs one warning naming them when an auth request carries a proxy-style header and no trusted proxy is configured..env.exampleshow the proxy's own address (172.18.0.2, or its compose network) rather than a broad private range: if every hop is trusted Better Auth finds no client and falls back to one bucket. The Docker note distinguishes Linux iptables NAT (client IP preserved) from Docker Desktop and loopback traffic via the userland proxy.clientIpAddressOptionsbuilds theadvanced.ipAddressblock and is unit-tested; stamper tests cover the once-only warning..env.example, config tests, stamper unit tests, changeset.