From 9c597d2c8fd35f5e3f546ed73cab769a074c322a Mon Sep 17 00:00:00 2001 From: Kent Wang Date: Sun, 18 Jun 2017 10:47:02 +0800 Subject: [PATCH] Replace string concat to path.Join --- server/server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/server.go b/server/server.go index d60aa4ae6a..74a8ec8b43 100644 --- a/server/server.go +++ b/server/server.go @@ -8,6 +8,7 @@ import ( "net" "net/http" "os" + "path" "runtime" "strconv" "time" @@ -182,7 +183,7 @@ func (s *Server) genericRedirectURL() string { genericName = s.GenericName } - return s.PublicURL + s.Basepath + "/oauth/" + genericName + "/callback" + return path.Join(s.PublicURL, s.Basepath, "oauth", genericName, "callback") } // BuildInfo is sent to the usage client to track versions and commits