[ARVADOS] created: 1.3.0-1853-g4f938f3a7

Git user git at public.curoverse.com
Tue Nov 12 20:52:58 UTC 2019


        at  4f938f3a77ef2629d934dec56e25a314c682b6aa (commit)


commit 4f938f3a77ef2629d934dec56e25a314c682b6aa
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Tue Nov 12 15:50:48 2019 -0500

    15107: Fix redirect target rewriting.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/lib/controller/railsproxy/railsproxy.go b/lib/controller/railsproxy/railsproxy.go
index 54257cffc..ba1c323ba 100644
--- a/lib/controller/railsproxy/railsproxy.go
+++ b/lib/controller/railsproxy/railsproxy.go
@@ -8,7 +8,6 @@ package railsproxy
 
 import (
 	"fmt"
-	"net/http"
 	"net/url"
 	"strings"
 
@@ -38,10 +37,5 @@ func NewConn(cluster *arvados.Cluster) *rpc.Conn {
 	if err != nil {
 		panic(err)
 	}
-	conn := rpc.NewConn(cluster.ClusterID, url, insecure, rpc.PassthroughTokenProvider)
-	// If Rails is running with force_ssl=true, this
-	// "X-Forwarded-Proto: https" header prevents it from
-	// redirecting our internal request to an invalid https URL.
-	conn.SendHeader = http.Header{"X-Forwarded-Proto": []string{"https"}}
-	return conn
+	return rpc.NewConn(cluster.ClusterID, url, insecure, rpc.PassthroughTokenProvider)
 }
diff --git a/services/api/config/application.rb b/services/api/config/application.rb
index 9a4270ad9..bb4ded0a2 100644
--- a/services/api/config/application.rb
+++ b/services/api/config/application.rb
@@ -76,6 +76,11 @@ module Server
 
     config.action_dispatch.perform_deep_munge = false
 
+    # force_ssl causes problems when arvados-controller connects to
+    # Rails internally via plain http. The Rails API should not be
+    # exposed to outside clients via either http or https anyway.
+    config.force_ssl = false
+
     I18n.enforce_available_locales = false
 
     # Before using the filesystem backend for Rails.cache, check

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list