Keep broker path in API CI public URL

This commit is contained in:
Jeppe Bundgaard
2026-07-01 11:02:26 +02:00
parent f5e0baaab6
commit 24badc39d7
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -228,7 +228,7 @@ jobs:
set -euo pipefail
cp .github/ci.env .env
cp .github/ci.env.staging .env.staging
printf '\nEDGE_PUBLIC_BROKER_URL=http://localhost:%s\n' "$EDGE_BROKER_CI_PORT" >> .env
printf '\nEDGE_PUBLIC_BROKER_URL=http://localhost:%s/edge-broker\n' "$EDGE_BROKER_CI_PORT" >> .env
- name: Setup Node.js
uses: actions/setup-node@v4
+4
View File
@@ -117,6 +117,10 @@ function resolveBrokerWebSocketUrl(rawUrl, apiBaseUrl) {
websocketUrl.pathname = `/api/edge-broker${brokerPath}`;
}
if (isLocalHost(websocketUrl.hostname)) {
websocketUrl.pathname = websocketUrl.pathname.replace(/^\/edge-broker(?=\/|$)/, "") || "/";
}
return websocketUrl.toString();
}