Skip to content

feat(auth): introduce experimental trustedProxyHeaders option#34

Merged
halvaradop merged 2 commits intomasterfrom
feat/add-trusted-proxy-headers-option
Dec 15, 2025
Merged

feat(auth): introduce experimental trustedProxyHeaders option#34
halvaradop merged 2 commits intomasterfrom
feat/add-trusted-proxy-headers-option

Conversation

@halvaradop
Copy link
Copy Markdown
Member

@halvaradop halvaradop commented Dec 15, 2025

Description

This pull request adds the experimental trustedProxyHeaders configuration option, which infers the request origin URL based on proxy-related headers such as X-Forwarded-Proto, X-Forwarded-Host, and Forwarded.

Warning

This option can be dangerous if misused. It should only be enabled when the application is deployed behind a trusted proxy, load balancer, or cloud service that correctly sets these headers. Since proxy headers can be forged by attackers, this option must only be set to true when the proxy is fully trusted.

import { createAuth } from "@aura-stack/auth"

const auth = createAuth({
  oauth: [],
  trustedProxyHeaders: true,
})

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Dec 15, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
auth Ready Ready Preview, Comment Dec 15, 2025 10:18pm

@halvaradop halvaradop merged commit 4e308e0 into master Dec 15, 2025
2 checks passed
@halvaradop halvaradop deleted the feat/add-trusted-proxy-headers-option branch December 15, 2025 22:28
@halvaradop halvaradop added enhancement New feature or request feature New functionality labels Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant