Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websocket: re-enable sockets via proxy block #198

Closed
malud opened this issue Apr 12, 2021 · 0 comments · Fixed by #280
Closed

Websocket: re-enable sockets via proxy block #198

malud opened this issue Apr 12, 2021 · 0 comments · Fixed by #280
Assignees

Comments

@malud
Copy link
Collaborator

malud commented Apr 12, 2021

Background
Currently the websocket protocol upgrade is not supported in favour of the option for multiple proxy / request calls within an endpoint. The Upgrade Response will not Hijack the current client / backend connection to pipe the bytes.

Proposal
Since the easiest and common way is a 1:1 client <> backend relation which should be upgraded while proxying. To do so we need to know which proxy block is enabled / allowed to do the upgrade. The backend block would be not a good place for this option, since multiple possible references leads to the same issue: which backend response will do the upgrade?

Introducing websocket: true to the proxy block:

proxy {
  websocket = true
  backend {
    # ...
   }
}

Other requests MAY be canceled on upgrade and a response block should not answer on upgrades.

Configuration validation should ensure proper endpoint websocket usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants