15799: Ensure default baseURL has a trailing slash.
authorTom Clegg <tclegg@veritasgenetics.com>
Wed, 6 Nov 2019 18:43:30 +0000 (13:43 -0500)
committerTom Clegg <tclegg@veritasgenetics.com>
Wed, 6 Nov 2019 18:43:30 +0000 (13:43 -0500)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg@veritasgenetics.com>

apps/workbench/app/views/layouts/application.html.erb

index bd3afbb681f098a1f3fe726e7d9bc49f671240ac..4fc7da9949cc7ebdaca5bf3cf24d54456ae8d5b6 100644 (file)
@@ -20,7 +20,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
   <meta name="author" content="">
   <% if current_user %>
     <% content_for :js do %>
-      window.defaultSession = <%=raw({baseURL: Rails.configuration.Services.Controller.ExternalURL.to_s, token: Thread.current[:arvados_api_token], user: current_user}.to_json)%>
+      window.defaultSession = <%=raw({baseURL: Rails.configuration.Services.Controller.ExternalURL.to_s.gsub(/\/?$/,'/'), token: Thread.current[:arvados_api_token], user: current_user}.to_json)%>
     <% end %>
   <% end %>
   <% if current_user and $arvados_api_client.discovery[:websocketUrl] %>