diff --git a/src/web/web.go b/src/web/web.go index 96ce926..1ccdc0d 100644 --- a/src/web/web.go +++ b/src/web/web.go @@ -43,12 +43,18 @@ func SetMirrors(node_mirror string, npm_mirror string) { if strings.ToLower(nodeBaseAddress[0:4]) != "http" { nodeBaseAddress = "http://" + nodeBaseAddress } + if !strings.HasSuffix(nodeBaseAddress, "/") { + nodeBaseAddress = nodeBaseAddress + "/" + } } if npm_mirror != "" && npm_mirror != "none" { npmBaseAddress = npm_mirror if strings.ToLower(npmBaseAddress[0:4]) != "http" { npmBaseAddress = "http://" + npmBaseAddress } + if !strings.HasSuffix(npmBaseAddress, "/") { + npmBaseAddress = npmBaseAddress + "/" + } } }