소스 검색

auto update script executed

Toby Chui 1 년 전
부모
커밋
50f72bf3fb
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  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]