@kortix/agent-tunnel 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client-cli.js +1 -1
- package/package.json +1 -1
- package/src/client/cli.ts +3 -1
package/dist/client-cli.js
CHANGED
|
@@ -223,7 +223,7 @@ var FALLBACK_API_URL = "http://localhost:8008";
|
|
|
223
223
|
function getApiBase() {
|
|
224
224
|
const raw = getEnv("TUNNEL_API_URL") || FALLBACK_API_URL;
|
|
225
225
|
const url = raw.startsWith("http") ? raw : FALLBACK_API_URL;
|
|
226
|
-
return url.replace(/\/+$/, "");
|
|
226
|
+
return url.replace(/\/+$/, "").replace(/\/v1\/router\/?$/, "");
|
|
227
227
|
}
|
|
228
228
|
var client = new TunnelClient({
|
|
229
229
|
apiUrl: `${getApiBase()}/v1/tunnel`,
|
package/package.json
CHANGED
package/src/client/cli.ts
CHANGED
|
@@ -57,7 +57,9 @@ const FALLBACK_API_URL = "http://localhost:8008";
|
|
|
57
57
|
function getApiBase(): string {
|
|
58
58
|
const raw = getEnv("TUNNEL_API_URL") || FALLBACK_API_URL;
|
|
59
59
|
const url = raw.startsWith("http") ? raw : FALLBACK_API_URL;
|
|
60
|
-
|
|
60
|
+
// Strip /v1/router suffix — TUNNEL_API_URL sometimes includes the router path
|
|
61
|
+
// but the CLI appends its own /v1/tunnel path.
|
|
62
|
+
return url.replace(/\/+$/, "").replace(/\/v1\/router\/?$/, "");
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
const client = new TunnelClient({
|