import (
"fmt"
- "net/http"
"net/url"
"strings"
- "git.curoverse.com/arvados.git/lib/controller/rpc"
- "git.curoverse.com/arvados.git/sdk/go/arvados"
+ "git.arvados.org/arvados.git/lib/controller/rpc"
+ "git.arvados.org/arvados.git/sdk/go/arvados"
)
-// For now, FindRailsAPI always uses the rails API running on this
-// node.
+// FindRailsAPI always uses the rails API running on this node, for now.
func FindRailsAPI(cluster *arvados.Cluster) (*url.URL, bool, error) {
var best *url.URL
for target := range cluster.Services.RailsAPI.InternalURLs {
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)
}