Today I learned about
Range requests. A library, that I am using in my client-side code, issues such against my web back-end, which doesn’t support them, though. However, the back-end is reverse-proxied by Caddy, so I thought Caddy’s
reverse_proxy directive might actually be able to resolve these range requests.
Caddy could act as kind of a “facade”, that accepts range requests even for upstreams, that don’t support such. In that case, Caddy would slice off certain parts of the response body, according to the requested byte range in case the upstream returns more bytes than requested by
Range header. Of course, between upstream and Caddy, the entire response would be transferred, but the outside client would only receive their requested byte range.
Is that something to be considered? Or do you see any issues here? I also might well have misunderstood the concept of range requests.