Browse Source

auto update script executed

Toby Chui 1 year ago
parent
commit
50f72bf3fb
1 changed files with 5 additions and 1 deletions
  1. 5 1
      router.go

+ 5 - 1
router.go

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