FEATURE: Client-side console log capturing and streaming endpoint #46
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
FEATURE: Client-side console log capturing and streaming API endpoint with dual-authentication
Problem / Requirement:
To aid in frontend troubleshooting, developers need a way to capture and gather client-side console logs (console.log, console.warn, console.error) and make them accessible over a real-time log stream endpoint. This helps debug frontend issues (such as SSE failures, CSP violations, and state synchronization issues) in environments without direct access to browser devtools.
Success Criteria:
• Save incoming logs into a separate rolling 1000-line buffer clientLogBuffer.
• Expose GET /api/debug/client-logs to stream client-side logs in real-time via SSE.
• Enableable only when the environment variable ENABLE_LOG_STREAM=true is set.
• Enforce exact same dual-auth rules (Emby session cookie, Basic Auth fallback, and X-Webhook-Secret header bypass) on both client logs endpoints.
Resolved in commit
3c6791658c.