Skip to main content

ws_origin_allowed

Function ws_origin_allowed 

Source
pub fn ws_origin_allowed(
    origin: Option<&str>,
    allow_origin: Option<&str>,
) -> bool
Expand description

Whether a WebSocket upgrade’s Origin is permitted.

With no --allow-origin configured, any origin is accepted (the token in the subprotocol is the gate). With one configured, the origin must match.