diff options
-rw-r--r-- | remote_url.go | 4 | ||||
-rw-r--r-- | resources.go | 6 | ||||
-rw-r--r-- | ssh_server.go | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/remote_url.go b/remote_url.go index 06ee0da..5c980f5 100644 --- a/remote_url.go +++ b/remote_url.go @@ -13,11 +13,11 @@ import ( // genSSHRemoteURL generates SSH remote URLs from a given group path and repo // name. func genSSHRemoteURL(groupPath []string, repoName string) string { - return strings.TrimSuffix(config.SSH.Root, "/") + "/" + segmentsToURL(groupPath) + "/:/repos/" + url.PathEscape(repoName) + return strings.TrimSuffix(config.SSH.Root, "/") + "/" + segmentsToURL(groupPath) + "/-/repos/" + url.PathEscape(repoName) } // genHTTPRemoteURL generates HTTP remote URLs from a given group path and repo // name. func genHTTPRemoteURL(groupPath []string, repoName string) string { - return strings.TrimSuffix(config.HTTP.Root, "/") + "/" + segmentsToURL(groupPath) + "/:/repos/" + url.PathEscape(repoName) + return strings.TrimSuffix(config.HTTP.Root, "/") + "/" + segmentsToURL(groupPath) + "/-/repos/" + url.PathEscape(repoName) } diff --git a/resources.go b/resources.go index 567976d..9d36ddf 100644 --- a/resources.go +++ b/resources.go @@ -17,7 +17,7 @@ import ( var sourceFS embed.FS var sourceHandler = http.StripPrefix( - "/:/source/", + "/-/source/", http.FileServer(http.FS(sourceFS)), ) @@ -80,10 +80,10 @@ func init() { if err != nil { panic(err) } - staticHandler = http.StripPrefix("/:/static/", http.FileServer(http.FS(staticFS))) + staticHandler = http.StripPrefix("/-/static/", http.FileServer(http.FS(staticFS))) manFS, err := fs.Sub(resourcesFS, "man") if err != nil { panic(err) } - manHandler = http.StripPrefix("/:/man/", http.FileServer(http.FS(manFS))) + manHandler = http.StripPrefix("/-/man/", http.FileServer(http.FS(manFS))) } diff --git a/ssh_server.go b/ssh_server.go index 67477e7..a3b69e4 100644 --- a/ssh_server.go +++ b/ssh_server.go @@ -51,7 +51,7 @@ func serveSSH(listener net.Listener) error { } clog.Info("Incoming SSH: " + session.RemoteAddr().String() + " " + clientPubkeyStr + " " + session.RawCommand()) - fmt.Fprintln(session.Stderr(), ansiec.Blue+"Lindenii Forge "+VERSION+", source at "+strings.TrimSuffix(config.HTTP.Root, "/")+"/:/source/"+ansiec.Reset+"\r") + fmt.Fprintln(session.Stderr(), ansiec.Blue+"Lindenii Forge "+VERSION+", source at "+strings.TrimSuffix(config.HTTP.Root, "/")+"/-/source/"+ansiec.Reset+"\r") cmd := session.Command() |