fix: key auth rate limiting on the socket address only and clear sent drafts after unmount

- auth: drop the AUTH_TRUSTED_PROXY_HEADERS opt-in. Configured headers were
  trusted from any peer, so direct access to the published port could still
  rotate them. Better Auth now reads only the Manager-set socket address
  header; the env, compose forwarding, docs and tests are removed.
- composer: a send that completes after the composer unmounted (session
  switched mid-send) left the submitted text in the per-session draft store.
  Sends now complete through mutateAsync and clear the stored draft only if
  it still matches what was submitted, so newer edits are kept.
This commit is contained in:
ioplex committed 2026-10-23 12:49:53 -04:00
1 parent 4ec62cd4e7
commit dabe750920
17 files changed
+268 -233

No files matched your search

-1
View File
@@ -129,7 +129,6 @@ export const ENV = {
SECRET: getEnvString('AUTH_SECRET', process.env.NODE_ENV === 'production' ? '' : generateDefaultSecret()),
TRUSTED_ORIGINS: getEnvString('AUTH_TRUSTED_ORIGINS', 'http://localhost:5173,http://localhost:5003,http://127.0.0.1:5173,http://127.0.0.1:5003'),
SECURE_COOKIES: getEnvBoolean('AUTH_SECURE_COOKIES', getEnvString('NODE_ENV', 'development') === 'production'),
TRUSTED_PROXY_HEADERS: getEnvString('AUTH_TRUSTED_PROXY_HEADERS', ''),
ADMIN_EMAIL: process.env.ADMIN_EMAIL,
ADMIN_PASSWORD: process.env.ADMIN_PASSWORD,
ADMIN_PASSWORD_RESET: getEnvBoolean('ADMIN_PASSWORD_RESET', false),