[PR #7835] [MERGED] docs: add trustedProxyHeaders section to security reference #33183

Closed
opened 2026-04-17 23:50:49 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7835
Author: @Paola3stefania
Created: 2/7/2026
Status: Merged
Merged: 2/12/2026
Merged by: @himself65

Base: canaryHead: docs/trusted-proxy-headers


📝 Commits (2)

  • 269d041 feat: trustedproxyhaeders
  • 7f3cb45 Merge branch 'canary' into docs/trusted-proxy-headers

📊 Changes

1 file changed (+30 additions, -0 deletions)

View changed files

📝 docs/content/docs/reference/security.mdx (+30 -0)

📄 Description

Summary by cubic

Add a “Trusted Proxy Headers” section to the Security reference explaining how Better Auth derives the base URL from X‑Forwarded‑Host/Proto when advanced.trustedProxyHeaders is enabled and no baseURL is set.
Includes a config example, a clear safety warning, the resolution order (config > env vars > proxy headers > request origin), and tips for multi‑domain apps like using trustedOrigins and keeping host‑only cookies for per‑domain sessions.

Written for commit 7f3cb45363. Summary will update on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/7835 **Author:** [@Paola3stefania](https://github.com/Paola3stefania) **Created:** 2/7/2026 **Status:** ✅ Merged **Merged:** 2/12/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `docs/trusted-proxy-headers` --- ### 📝 Commits (2) - [`269d041`](https://github.com/better-auth/better-auth/commit/269d0413c70069f13f821c94e177955b3bca465d) feat: trustedproxyhaeders - [`7f3cb45`](https://github.com/better-auth/better-auth/commit/7f3cb45363614f6a2f51a94c4a5913d8666fc6bb) Merge branch 'canary' into docs/trusted-proxy-headers ### 📊 Changes **1 file changed** (+30 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/reference/security.mdx` (+30 -0) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Add a “Trusted Proxy Headers” section to the Security reference explaining how Better Auth derives the base URL from X‑Forwarded‑Host/Proto when advanced.trustedProxyHeaders is enabled and no baseURL is set. Includes a config example, a clear safety warning, the resolution order (config > env vars > proxy headers > request origin), and tips for multi‑domain apps like using trustedOrigins and keeping host‑only cookies for per‑domain sessions. <sup>Written for commit 7f3cb45363614f6a2f51a94c4a5913d8666fc6bb. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-17 23:50:49 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#33183