Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

fix: restore envWithFallback for PINCHTAB_TOKEN support

Data512dea654399
diff --git a/internal/dashboard/dashboard.go b/internal/dashboard/dashboard.go
index 2deaa6c3..cf9f7059 100644
--- a/internal/dashboard/dashboard.go
+++ b/internal/dashboard/dashboard.go
@@ -14,6 +14,13 @@ import (
"github.com/pinchtab/pinchtab/internal/bridge"
)
+func envWithFallback(newKey, oldKey string) string {
+ if v := os.Getenv(newKey); v != "" {
+ return v
+ }
+ return os.Getenv(oldKey)
+}
+
type DashboardConfig struct {
IdleTimeout time.Duration
DisconnectTimeout time.Duration
@@ -108,7 +115,7 @@ func NewDashboard(cfg *DashboardConfig) *Dashboard {
sseConns: make(map[chan AgentEvent]struct{}),
sysConns: make(map[chan SystemEvent]struct{}),
cancel: cancel,
- childAuthToken: os.Getenv("BRIDGE_TOKEN"),
+ childAuthToken: envWithFallback("PINCHTAB_TOKEN", "BRIDGE_TOKEN"),
}
return d
}