Skip to content

fix(api-server): add auth headers to WebSocket proxy#10141

Merged
davidfirst merged 2 commits intomasterfrom
fix/websocket-proxy-headers
Dec 31, 2025
Merged

fix(api-server): add auth headers to WebSocket proxy#10141
davidfirst merged 2 commits intomasterfrom
fix/websocket-proxy-headers

Conversation

@davidfirst
Copy link
Copy Markdown
Member

Forward authentication headers on WebSocket connections to cloud server using the proxyReqWs hook from http-proxy-middleware instead of manually handling server upgrade events.

Forward authentication headers on WebSocket connections to cloud server
using the proxyReqWs hook from http-proxy-middleware.
Copilot AI review requested due to automatic review settings December 31, 2025 17:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors WebSocket proxy configuration to add authentication headers by migrating from a manual server upgrade event handler to using the proxyReqWs hook provided by http-proxy-middleware. This approach aligns with how other proxies in the file (GraphQL and REST) are configured.

Key Changes:

  • Removed manual WebSocket proxy handling using http-proxy's createProxyServer and server upgrade events
  • Implemented authentication header forwarding using the proxyReqWs hook within createProxyMiddleware configuration
  • Cleaned up the http-proxy import that is no longer needed

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@davidfirst davidfirst enabled auto-merge (squash) December 31, 2025 18:28
@davidfirst davidfirst merged commit 51db347 into master Dec 31, 2025
12 checks passed
@davidfirst davidfirst deleted the fix/websocket-proxy-headers branch December 31, 2025 19:00
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