Преглед на файлове

auto update script executed

Toby Chui преди 1 година
родител
ревизия
6d1a4493cf
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      router.go

+ 2 - 1
router.go

@@ -34,7 +34,8 @@ func AuthFsHandler(handler http.Handler) http.Handler {
 		if strings.HasPrefix(r.URL.Path, "/web.ssh/") {
 			requestPath := r.URL.Path
 			if !strings.HasSuffix(requestPath, "/") {
-				requestPath = requestPath + "/"
+				http.Redirect(w, r, requestPath+"/", http.StatusTemporaryRedirect)
+				return
 			}
 			parts := strings.Split(requestPath, "/")
 			if len(parts) > 2 {