Determine WebSocket connection without Upgrade header
The HTTP Upgrade header is hop-by-hop only and therefore removed by a reverse proxy. Read more: http://nginx.org/en/docs/http/websocket.html
This commit is contained in:
@ -15,8 +15,7 @@ module Middleware
|
||||
private
|
||||
|
||||
def websocket_upgrade?(request)
|
||||
request.get_header('HTTP_CONNECTION')&.casecmp?('Upgrade') &&
|
||||
request.get_header('HTTP_UPGRADE')&.casecmp?('websocket')
|
||||
request.has_header?('HTTP_SEC_WEBSOCKET_VERSION')
|
||||
end
|
||||
|
||||
def extract_sentry_parameters(request)
|
||||
|
Reference in New Issue
Block a user