The frontend's text assets shipped uncompressed on every cold load. Add Starlette's GZipMiddleware. Measured on the current assets: - style.css 1,127 KB -> 238 KB (-79%) - index.html 202 KB -> 35 KB (-83%) - chat.js 238 KB -> 60 KB (-75%) minimum_size=1024 skips tiny bodies; Starlette excludes `text/event-stream` by default, so the SSE streams (chat, shell, research, model-probe — all served with media_type="text/event-stream") are never compressed or buffered. Composes cleanly with the existing security-header middleware. No behavioural change. Built by OdWar -- with Claude thinking alongside.
47 KiB
47 KiB