mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 12:07:28 +01:00
Yesterday's session diagnosed a silent trap: cockpit-daemon.sh's _base_url() prefers local-when-reachable, so a user running both cockpit-app systemd on localhost:3000 AND $COCKPIT_BASE_URL pointed at https://cockpitapp.vercel.app silently polls local, ignoring every dispatch from the production /control page. The fix on the user's machine was a one-line daemon.env edit (DAEMON_FORCE_REMOTE=1) — but nothing in the script tells them they're in this state. Added a startup-time warning in _init_base_url: when the daemon picks LOCAL but $COCKPIT_BASE_URL is a non-localhost URL, three log lines fire explaining the trap and the fix. Stays silent for genuine dev setups ($COCKPIT_BASE_URL pointing at localhost or 127.0.0.1) so it doesn't cry wolf. Bash syntax clean. No behavior change — same routing logic, just a diagnostic log when the trap configuration is detected.