`.text()` decompresses, so the rewritten HTML goes back plain — while the headers still said `content-encoding: gzip`. The next hop believed the header, tried to gunzip plain text, and failed with ZlibError. Which surfaced as "gitea unreachable": a 502 naming nothing, while a direct curl to the sidecar returned 200 the whole time.