towerops/lib/towerops_web
Graham McIntire 31b906b0fa
Fix agent IP detection to use real client IP from proxy headers
The agent's last_seen IP was showing the Docker container IP (10.244.x.x)
because conn.remote_ip returns the proxy/load balancer IP.

Changes:
- Added get_client_ip/1 helper that checks X-Forwarded-For first
- Falls back to X-Real-IP if X-Forwarded-For not present
- Falls back to conn.remote_ip as last resort
- Applied to both AgentAuth plug and AgentController heartbeat endpoint

Now correctly shows the actual external IP of the remote agent.
2026-01-14 17:04:59 -06:00
..
components Add Agents navigation link to authenticated layout 2026-01-13 13:14:23 -06:00
controllers Fix agent IP detection to use real client IP from proxy headers 2026-01-14 17:04:59 -06:00
live Enhance agent assignment UI with clear inheritance indicators 2026-01-14 16:20:20 -06:00
plugs Fix agent IP detection to use real client IP from proxy headers 2026-01-14 17:04:59 -06:00
endpoint.ex Fix health check logging with dynamic log level in endpoint 2026-01-06 13:57:32 -06:00
gettext.ex init 2025-12-21 11:10:43 -06:00
router.ex Fix agent API to accept protobuf content type 2026-01-14 16:58:11 -06:00
telemetry.ex format 2025-12-21 11:31:08 -06:00
user_auth.ex Streamline login flow and fix test failures 2026-01-13 13:08:24 -06:00