Skip to main content

WS_PORT_SUBPROTOCOL_PREFIX

Constant WS_PORT_SUBPROTOCOL_PREFIX 

Source
pub const WS_PORT_SUBPROTOCOL_PREFIX: &'static str;
Expand description

The prefix the target port rides behind in a WebSocket handshake.

The subprotocol counterpart of PROXY_PORT_HEADER, and it is present for the same reason: the token is scoped to a set of ports and the request has to name which one. Omitting it is the same rejection-that-reads-like-a-bad-token described in the module docs.