Skip to content

Fix redirect#346

Merged
oschwartz10612 merged 7 commits intomainfrom
dev
May 8, 2026
Merged

Fix redirect#346
oschwartz10612 merged 7 commits intomainfrom
dev

Conversation

@oschwartz10612
Copy link
Copy Markdown
Member

  • fix(http): Set host header based on in
  • fix(http): populate Request.TLS for private HTTPS via httpConnCtx
  • Fix the redirect
  • Bump version

LaurenceJJones and others added 7 commits May 8, 2026 13:45
fix fosrl/pangolin#2952 issue by setting the incoming host header to the outgoing one by the reverse proxy, this was the default behaviour when using single proxy but now since we use more features it now rewrites the host header
net/http only sets Request.TLS for *tls.Conn or conns implementing ConnectionState(). Our listener wrapped tls.Server in httpConnCtx with an embedded net.Conn, so TLS was never surfaced and r.TLS stayed nil. That triggered the HTTP→HTTPS permanent redirect on every request for HTTPS rules.

Add ConnectionState() on httpConnCtx delegating to the underlying TLS conn.
Add tests for TLS forwarding and plain TCP.
…redirect-500

fix(http): Set host header based on in
…nt-redirect-loop

fix(http): populate Request.TLS for private HTTPS via httpConnCtx
@oschwartz10612 oschwartz10612 merged commit 0da8a29 into main May 8, 2026
12 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.

3 participants