fix(ingress): forward all headers in WebSocket proxy#1058
Conversation
…oded whitelist The WebSocket proxy only forwarded Origin, Sec-WebSocket-Protocol, and Cookie headers to the backend, silently dropping all others. This caused execd to reject PTY WebSocket connections with 401 because the X-EXECD-ACCESS-TOKEN header never reached it. Replace the whitelist with a blacklist that skips only hop-by-hop headers (RFC 7230 §6.1) and WebSocket handshake headers managed by the dialer, matching httputil.ReverseProxy behavior on the HTTP path. Closes #1050 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e44f00d0c9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Parse Connection header values and skip any header listed as a connection token, in addition to the fixed hop-by-hop set. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 12ac3d1907
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Summary
header.goX-EXECD-ACCESS-TOKENbeing silently dropped, causing execd 401 on PTY WebSocket connectionsCloses #1050
Test plan
go build ./...passesgo test ./pkg/proxy/...passesEXECD_ACCESS_TOKEN, connect PTY WebSocket through ingress URI mode, verify upgrade succeeds🤖 Generated with Claude Code