We use imaginary upstream from an nginx cache, and would like for nginx to receive the cache-control response header from the http sources that imaginary is pulling from. In our case S3 and Google Cloud Storage, where we can set the cache-control value when the image is stored there.
It appears currently that imaginary just returns the image buffer / body content from the http.Response, and doesn't pass through the response headers.
We don't want to use -http-cache-ttl as that doesn't accurately reflect the cache-control needs of the source images.
I'm working on a PR that works similarly to the -forward-headers argument, except for url response headers. The idea being that users can decide what headers if any they want passed back from a response, e.g.:
We use imaginary upstream from an nginx cache, and would like for nginx to receive the cache-control response header from the http sources that imaginary is pulling from. In our case S3 and Google Cloud Storage, where we can set the cache-control value when the image is stored there.
It appears currently that imaginary just returns the image buffer / body content from the http.Response, and doesn't pass through the response headers.
We don't want to use
-http-cache-ttl
as that doesn't accurately reflect the cache-control needs of the source images.I'm working on a PR that works similarly to the
-forward-headers
argument, except for url response headers. The idea being that users can decide what headers if any they want passed back from a response, e.g.:I'm new to Golang and may need some help, but I'll get a PR together. Please let me know if you have concerns or recommendations.
Thanks!