Method: Rack::WebSocket::Handler.detect

Defined in:
lib/rack/websocket/handler.rb

.detect(env) ⇒ Object

Detect current server using software Rack string



10
11
12
13
14
15
16
17
# File 'lib/rack/websocket/handler.rb', line 10

def self.detect(env)
  server_software = env['SERVER_SOFTWARE']
  if server_software.match(/\Athin /i)
    Thin
  else
    Stub
  end
end