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

1 Commits

Author SHA1 Message Date
f750663eca Add content negotiation for raw JSONL logs endpoint
Some checks failed
CI / test (pull_request) Has been cancelled
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).
2026-03-10 10:58:58 -07:00