diff --git a/pkg/extension/server.go b/pkg/extension/server.go
index 9e38a22f2aec12bf930160ad004952195c3581d4..6f2c24425222c687f4a39513893028ffe8475dd8 100644
--- a/pkg/extension/server.go
+++ b/pkg/extension/server.go
@@ -81,13 +81,13 @@ func (srv *Server) Update(ctx context.Context, request *UpdateRequest) (*UpdateR
 }
 
 func (srv *Server) Action(ctx context.Context, in *pb.ActionRequest) (*pb.ActionResponse, error) {
-	ext := in.Extension
-	if ext == "" {
-		actionURL, err := action.NewURL(in.Action)
-		if err != nil {
-			return nil, err
-		}
-		ext = actionURL.Extension()
+	actionURL, err := action.NewURL(in.Action)
+	if err != nil {
+		return nil, err
+	}
+	ext := actionURL.Extension()
+	if ext == "" && in.Extension != "" {
+		ext = in.Extension
 	}
 
 	svc, ok := srv.services[ext]
diff --git a/pkg/extension/service/extension.go b/pkg/extension/service/extension.go
index 215aca85ff935ba03248664abbb716d47f26b2cf..8b9aefd3db639a5ab400c6ed32f8ee607485dd6c 100644
--- a/pkg/extension/service/extension.go
+++ b/pkg/extension/service/extension.go
@@ -156,13 +156,13 @@ func (s *Extension) Uninstall(ctx context.Context, in *extension.UninstallReques
 }
 
 func (s *Extension) Action(ctx context.Context, in *extension.ActionRequest) (*extension.ActionResponse, error) {
-	ext := in.Extension
-	if ext == "" {
-		actionURL, err := action.NewURL(in.Action)
-		if err != nil {
-			return nil, err
-		}
-		ext = actionURL.Extension()
+	actionURL, err := action.NewURL(in.Action)
+	if err != nil {
+		return nil, err
+	}
+	ext := actionURL.Extension()
+	if ext == "" && in.Extension != "" {
+		ext = in.Extension
 	}
 	ok, err := extension.CheckInstalled(ctx, s.Content, in.SpaceId, in.EnvId, ext)
 	if err != nil {