|
@@ -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]
|