fix(web): use public api origin for browser-side SSE subscriber #216
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
psa-systems/bunyip!216
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/BUNYIP-192-sse-public-origin"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The SSE subscriber injected into every authenticated shell opened
new EventSource(api_origin + '/v1/events')againstcfg.api_url,which is the SERVER-SIDE outbound origin (e.g.
http://bunyip-api-app:4401on docker compose). On HTTPS production pages the browser refused that
URL as Mixed Content; the dashboard never received live updates.
Split the two:
BUNYIP_API_URLkeeps its role as the BFF's outboundorigin to bunyip-api; new
BUNYIP_API_PUBLIC_ORIGINis the URL theBROWSER hits and is what
install_sse_api_originnow pins. Defaultsto
api_urlso dev (where loopback IS the public URL) is unaffected.Production sets
BUNYIP_API_PUBLIC_ORIGIN=https://api.<apex>on thebunyip-web compose service to point the EventSource at Traefik's
HTTPS-terminated public hostname.
#BUNYIP-192