Skip to content

Commit 54432d8

Browse files
authored
fix: fix remote debug can not redirect (#761)
1 parent 2c7aa9f commit 54432d8

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

internal/core/plugin_manager/manager.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package plugin_manager
22

33
import (
4+
"errors"
45
"fmt"
56

67
lru "github.com/hashicorp/golang-lru/v2"
@@ -191,6 +192,17 @@ func (p *PluginManager) Config() *app.Config {
191192
func (c *PluginManager) NeedRedirecting(
192193
identity plugin_entities.PluginUniqueIdentifier,
193194
) (bool, error) {
195+
if identity.RemoteLike() {
196+
_, err := c.controlPanel.GetPluginRuntime(identity)
197+
if err != nil {
198+
if errors.Is(err, controlpanel.ErrPluginRuntimeNotFound) {
199+
return true, nil
200+
}
201+
return true, err
202+
}
203+
return false, nil
204+
}
205+
194206
if c.config.Platform == app.PLATFORM_SERVERLESS {
195207
// under serverless mode, it's no need to do redirecting
196208
return false, nil

0 commit comments

Comments
 (0)