Skip to content

Releases: SchmidtDSE/api_dock

Release list

v0.6.1

Choose a tag to compare

@brookisme brookisme released this 12 Jun 19:11
  • new features
    • Remote proxy responses are now streamed (FastAPI) — upstream bytes are piped to the client as they arrive instead of being buffered fully in memory
    • New timeout setting (default 10s) for the upstream request; set to null/false to disable
  • bug fixes
    • Large upstream responses no longer return 502 — streamed via StreamingResponse instead of reading the whole body into memory
    • Content-Encoding (gzip/br/deflate) is now preserved on compressed responses — raw bytes are streamed via aiter_raw() so the header stays valid and the client can decompress
    • Slow upstreams (e.g. large aggregation queries) no longer 502 at httpx's hardcoded 5s default — the timeout is now configurable via the timeout setting
  • cleanup / other improvements
    • Added PreparedRequest dataclass and split route validation/resolution into RouteMapper.prepare_remote_request(); the FastAPI adapter issues the streaming HTTP call
    • map_route() (buffered) retained for the Flask/sync path
    • Added streaming test coverage (TestStreamUpstream, plus prepare_remote_request and streaming-header tests) — 53 tests total

v0.6.0

Choose a tag to compare

@brookisme brookisme released this 10 Jun 04:17
  • new features
    • Cookie injection: dict entries in the cookies list inject server-side cookies into upstream requests, with env:MY_VAR env var support and literal value support
  • bug fixes
    • Binary responses (image, audio) no longer corrupted — raw bytes passed through with correct content-type
    • 3xx redirects returned to client when follow_redirects: false (previously followed internally, doubling egress)
    • Upstream response headers (Cache-Control, ETag, Last-Modified, etc.) now forwarded to client
    • Upstream 4xx/5xx error bodies passed through verbatim (previously wrapped/swallowed)
    • JSON responses no longer re-serialized — raw bytes returned as-is, preserving exact upstream payload
    • api-dock init now works correctly when installed from PyPI (example configs moved inside the api_dock package so importlib.resources resolves them)
  • cleanup / other improvements
    • Added ProxyResponse typed dataclass as the return contract for map_route() and map_database_route()
    • Added test suite (38 tests covering proxy pipeline and cookie injection)
    • Replaced stale config/ templates with clean example_api_dock_config/ (removed unimplemented features; real advanced features kept as commented examples)
    • Removed broken root __init__.py that caused pytest import conflicts
    • Bumped cryptography dependency to >=48.0.0,<49.0.0