h2non / imaginary

Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing
https://fly.io/docs/app-guides/run-a-global-image-service/
MIT License
5.5k stars 455 forks source link

Is there a way to pass through Cache-control headers? #421

Closed EyePulp closed 7 months ago

EyePulp commented 7 months ago

Howdy; When using -enable-url-source, I would like to pass thecache-control header from the upstream source instead of use the -http-cache-ttl argument (different sources have different cache control needs). Is there a way to pass cache-control through as part of the response headers from imaginary?

I have tried -forward-headers cache-control but no cache-control value comes through at all unless include the -http-cache-ttl (and this is testing an image with a cache-control header served from source, just to be clear).

Thanks!

EyePulp commented 7 months ago

I think I'll open an issue more specific to the ask now that I see how -forward-headers is meant to work