4 Commits

Author SHA1 Message Date
Sam Morrow b473a5afd1 feat(http): ignore proxy forwarding headers by default
X-Forwarded-Host and X-Forwarded-Proto were unconditionally honored when
constructing OAuth resource metadata URLs. In HTTP-mode deployments that
do not set --base-url and are not fronted by a proxy that strips these
headers, this lets an on-path client influence the URL advertised in
WWW-Authenticate and the /.well-known/oauth-protected-resource body.

This is a hardening change rather than a true vulnerability — exploiting
it requires HTTP without --base-url plus an attacker already positioned
to inject the header — but the unsafe default is worth closing.

Default behavior now derives host/scheme from r.Host and the TLS state.
Setups that rely on a trusted internal forwarder (e.g. an in-cluster
gateway that needs to preserve the originating hostname per request) can
opt back in with --trust-proxy-headers / GITHUB_TRUST_PROXY_HEADERS=1.
--base-url continues to take precedence in all cases.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-27 07:29:04 +02:00
Adam Holt 121d50af05 Don't use privilaged ports or https for docs 2026-02-06 18:11:14 +00:00
Adam Holt 5b0fb9c883 Update docs/streamable-http.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-06 18:11:14 +00:00
Adam Holt 3df58879b6 Add Streamable HTTP documentation 2026-02-06 18:11:14 +00:00