#!/bin/bash
export LC_ALL=C
echo "=== where the headers are built ==="
docker exec 9router sh -c 'grep -rln "x-opencode-session" /app/open-sse 2>/dev/null | head -5' 2>&1

echo
docker exec 9router sh -c 'for f in $(grep -rln "x-opencode-session" /app/open-sse 2>/dev/null | head -2); do echo "## $f"; grep -oE ".{400}x-opencode-session.{500}" "$f" 2>/dev/null | head -1; echo; done' 2>&1 | head -30
