Skip to content

Upgrade websocket request when header present, otherwise do not reject #1752

@shalako

Description

@shalako

The current websocket support appears to offer two choices:

  • When route is configured with use_websocket:true upgrade if header is present, otherwise reject
  • The spec doesn't say what the behavior is when use_websocket:false; are requests with the upgrade header rejected or is the header ignored and the request forwarded over http?

The behavior of Cloud Foundry's current edge proxy is:

  • If the upgrade header is present, we initiate a TCP connection to the backend
  • If the upgrade header is not present, we forward an HTTP request
  • There is no user control of whether upgrade header is rejected or accepted
  • Apps are responsible for rejecting connections/requests based on whether they require TCP or HTTP requests

In order to transition from our current edge proxy to Envoy without downtime for upstream applications, we must continue supporting websockets on all routes without breaking apps that don't support them.

Could we change the semantics of this boolean to:

  • when use_websocket:true upgrade if header is present, otherwise forward request over http
  • when use_websocket:false keep current behavior

Metadata

Metadata

Assignees

Labels

enhancementFeature requests. Not bugs or questions.help wantedNeeds help!

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions