Преглед изворни кода

auto update script executed

Toby Chui пре 1 година
родитељ
комит
66dcfb3e37
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      router.go

+ 2 - 2
router.go

@@ -33,11 +33,11 @@ func AuthFsHandler(handler http.Handler) http.Handler {
 		//Example URL Path: /web.ssh/{{instance_uuid}}/*
 		if strings.HasPrefix(r.URL.Path, "/web.ssh/") {
 			requestPath := r.URL.Path
-			if !strings.HasSuffix(requestPath, "/") {
+			parts := strings.Split(requestPath, "/")
+			if !strings.HasSuffix(requestPath, "/") && len(parts) == 3 {
 				http.Redirect(w, r, requestPath+"/", http.StatusTemporaryRedirect)
 				return
 			}
-			parts := strings.Split(requestPath, "/")
 			if len(parts) > 2 {
 				//Extract the instance ID from the request path
 				instanceUUID := parts[2]