Keep broker path in API CI public URL
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user