Add content negotiation for raw JSONL logs #16

Merged
probablycorey merged 1 commits from probablycorey/raw-jsonl-endpoint into main 2026-03-10 18:02:08 +00:00

The /logs endpoint now returns different response formats based on Accept headers, making it discoverable for both humans and agents:

  • Browsers get the interactive HTML log viewer
  • Agents get raw JSONL with proper content-type
  • Without a file parameter, agents get a JSON list of available files for discovery

Also improved security: invalid filenames now throw errors (500) instead of silently returning empty results.

The `/logs` endpoint now returns different response formats based on Accept headers, making it discoverable for both humans and agents: - Browsers get the interactive HTML log viewer - Agents get raw JSONL with proper content-type - Without a file parameter, agents get a JSON list of available files for discovery Also improved security: invalid filenames now throw errors (500) instead of silently returning empty results.
probablycorey added 1 commit 2026-03-10 17:59:13 +00:00
Add content negotiation for raw JSONL logs endpoint
Some checks failed
CI / test (pull_request) Has been cancelled
f750663eca
The /logs endpoint now returns different formats based on Accept headers:
- Browsers (Accept: text/html) get the interactive HTML log viewer
- Agents/fetch requests get raw JSONL when no Accept header includes text/html
- Without a file parameter, agents get a JSON array of available log files

Also improved security: invalid filenames now throw errors (500) instead of silently failing (404).
Author
Owner

test from gitea

test from gitea
probablycorey merged commit cb10121fb5 into main 2026-03-10 18:02:08 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: probablycorey/workshop#16
No description provided.