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