Expand description
Upgraded connections (WebSocket) relayed to a backend (moved from the
Gateway API controller in 18.21.0; config proxy routes use it too).
Upgraded connections (WebSocket) through a proxy (a Gateway API route, or
a config-file type = "proxy" route since 18.21.0): the request
goes to the backend over its own connection; a 101 hands the client’s
connection to a byte relay with the backend, anything else is answered
as a normal response.
Functions§
- forward
- Forward an upgrade request to
ip:port. - is_
upgrade - Whether the request asks to switch protocols (
Connection: upgradeand anUpgradeheader). - request_
head - The request head as sent to the backend: the client’s headers (with
Host=host) plusX-Forwarded-Forand, unless the client sent one,X-Forwarded-Host(the client’s ownHost).