Skip to content

Fix lanis-logger login telemetry User-Agent - #523

Merged
alessioc42 merged 1 commit into
mainfrom
fix/lanis-logger-user-agent
Aug 1, 2026
Merged

Fix lanis-logger login telemetry User-Agent#523
alessioc42 merged 1 commit into
mainfrom
fix/lanis-logger-user-agent

Conversation

@alessioc42

Copy link
Copy Markdown
Member

Summary

  • Production login telemetry was silently rejected because school-monitor-backend only accepts User-Agent Lanis-Mobile, while the session Dio client sends a versioned agent and overwrites per-request headers.
  • Session Dio also treats HTTP 201 as failure via validateStatus, so even an accepted logger response would surface as a client-side failure.
  • Use a dedicated Dio client for /api/log-login with the required User-Agent.

Test plan

  • Release-mode login/bootstrap posts to https://lanis-logger.orion.alessioc42.dev/api/log-login with User-Agent: Lanis-Mobile
  • Confirm the logger responds with HTTP 201 (not the 200 decoy version payload)
  • Confirm a new Influx clientloginmesurement point appears for the school/version/platform
  • SPH requests still use the versioned Lanis-Mobile/v… User-Agent

Send the exact Lanis-Mobile agent on a dedicated Dio client so the
session interceptor and 201 validateStatus no longer drop the event.
@alessioc42
alessioc42 merged commit 879156e into main Aug 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant