Skip to content

Fix OAuth issuer URL behind reverse proxy#458

Merged
asim merged 1 commit intomainfrom
claude/fix-oauth-flow
Mar 28, 2026
Merged

Fix OAuth issuer URL behind reverse proxy#458
asim merged 1 commit intomainfrom
claude/fix-oauth-flow

Conversation

@asim
Copy link
Copy Markdown
Member

@asim asim commented Mar 28, 2026

Fix OAuth metadata returning localhost URLs when behind a reverse proxy. Uses X-Forwarded-Host/Proto headers.\n\nhttps://claude.ai/code/session_01GRGLA9yj7BpqKiyi6xFwnm

The server receives plain HTTP behind a proxy even though clients
use HTTPS. r.TLS is nil and r.Host may be the internal address.

Now checks X-Forwarded-Host and X-Forwarded-Proto headers to
determine the correct public URL. Falls back to HTTPS for any
host with a dot (domain name), HTTP only for bare hostnames
(localhost dev).

https://claude.ai/code/session_01GRGLA9yj7BpqKiyi6xFwnm
@asim asim merged commit ecee04f into main Mar 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants