# WebSocket upgrade detection map (loaded in http context) map $http_upgrade $is_websocket { default 0; "websocket" 1; }