3 # See application.yml for details about configuring the websocket service.
5 Server::Application.configure do
6 # Enables websockets if ARVADOS_WEBSOCKETS is defined with any value. If
7 # ARVADOS_WEBSOCKETS=ws-only, server will only accept websocket connections
8 # and return an error response for all other requests.
9 if ENV['ARVADOS_WEBSOCKETS']
10 config.middleware.insert_after ArvadosApiToken, RackSocket, {
12 :mount => "/websocket",
13 :websocket_only => (ENV['ARVADOS_WEBSOCKETS'] == "ws-only")