3 Server::Application.configure do
4 # Enables websockets if ARVADOS_WEBSOCKETS is defined with any value. If
5 # ARVADOS_WEBSOCKETS=ws-only, server will only accept websocket connections
6 # and return an error response for all other requests.
7 if ENV['ARVADOS_WEBSOCKETS']
8 config.middleware.insert_after ArvadosApiToken, RackSocket, {
10 :mount => "/websocket",
11 :websocket_only => (ENV['ARVADOS_WEBSOCKETS'] == "ws-only")
15 # Define websocket_address configuration option, can be overridden in config files.
16 # See application.yml.example for details.
17 config.websocket_address = nil