diff --git a/app/assets/javascripts/editor/execution.js.erb b/app/assets/javascripts/editor/execution.js.erb index 8d2c744e..37c53cb0 100644 --- a/app/assets/javascripts/editor/execution.js.erb +++ b/app/assets/javascripts/editor/execution.js.erb @@ -6,8 +6,10 @@ CodeOceanEditorWebsocket = { sockURL.pathname = url; sockURL.protocol = '<%= DockerClient.config['ws_client_protocol'] %>'; - //return the URL, but strip last # if there is one... - return sockURL.toString().replace(/#$/,''); + // strip anchor if it is in the url + sockURL.hash = '' + + return sockURL.toString(); }, initializeSocket: function(url) { diff --git a/config/deploy.rb b/config/deploy.rb index 173f2b56..f4b10182 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -4,7 +4,7 @@ set :default_env, 'PATH' => '/usr/java/jdk1.8.0_40/bin:$PATH' set :deploy_to, '/var/www/app' set :keep_releases, 3 set :linked_dirs, %w(log public/uploads tmp/cache tmp/files tmp/pids tmp/sockets) -set :linked_files, %w(config/action_mailer.yml config/code_ocean.yml config/database.yml config/newrelic.yml config/secrets.yml config/sendmail.yml config/smtp.yml) +set :linked_files, %w(config/action_mailer.yml config/docker.yml.erb config/code_ocean.yml config/database.yml config/newrelic.yml config/secrets.yml config/sendmail.yml config/smtp.yml) set :log_level, :info set :puma_threads, [0, 16] set :repo_url, 'git@github.com:openHPI/codeocean.git' diff --git a/config/docker.yml.erb b/config/docker.yml.erb index 8fac75d0..c1871de7 100644 --- a/config/docker.yml.erb +++ b/config/docker.yml.erb @@ -32,7 +32,7 @@ production: timeout: 60 workspace_root: <%= Rails.root.join('tmp', 'files', Rails.env) %> ws_host: ws://localhost:4243 #url to connect rails server to docker host - ws_client_protocol: wss:// #set the websocket protocol to be used by the client to connect to the rails server (ws on development, wss on production) + ws_client_protocol: 'wss:' #set the websocket protocol to be used by the client to connect to the rails server (ws on development, wss on production) staging: <<: *default @@ -46,7 +46,7 @@ staging: timeout: 60 workspace_root: <%= Rails.root.join('tmp', 'files', Rails.env) %> ws_host: ws://localhost:4243 #url to connect rails server to docker host - ws_client_protocol: wss:// #set the websocket protocol to be used by the client to connect to the rails server (ws on development, wss on production) + ws_client_protocol: 'wss:' #set the websocket protocol to be used by the client to connect to the rails server (ws on development, wss on production) test: <<: *default