From 70a32ee2eebee90b57c6adc2e22ab80275d3a151 Mon Sep 17 00:00:00 2001
From: ko_oler <kooler89@gmail.com>
Date: Wed, 11 Oct 2023 09:56:26 +0300
Subject: [PATCH] fix

---
 pkg/extension/action_url.go | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/pkg/extension/action_url.go b/pkg/extension/action_url.go
index 463ac68f..ec03375f 100644
--- a/pkg/extension/action_url.go
+++ b/pkg/extension/action_url.go
@@ -20,11 +20,13 @@ func NewActionURL(action string) (*ActionURL, error) {
 }
 
 func (u *ActionURL) actionParts() (string, string) {
-	if u.URL != nil && u.URL.Scheme == "grpc" {
-		splitPath := strings.Split(strings.TrimLeft(u.Path, "/"), "/")
-		if len(splitPath) >= 2 {
-			return splitPath[0], splitPath[1]
-		}
+	splitPath := strings.Split(strings.TrimLeft(u.Path, "/"), "/")
+	if u.URL != nil && u.URL.Scheme == "grpc" && len(splitPath) >= 2 {
+		return splitPath[0], splitPath[1]
+	}
+	// for backwards compatibility
+	if len(splitPath) == 1 {
+		return "", splitPath[0]
 	}
 	return "", ""
 }
-- 
GitLab