Open muxa opened 5 months ago
Same problem with Redis connection
imageproxy -addr 0.0.0.0:8080 -cache redis://:@redis:6379/0
what caching headers is the upstream server sending? It's been a little while, but there was some discussion some time ago about overriding upstream caching headers, but I don't think it was ever implemented: https://github.com/willnorris/imageproxy/issues/28
Hi @willnorris
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Real-IP $remote_addr;
However, the thumbnails are not in the folder. The CPU is always running. Imageproxy performs the resize but never saves the output.
But what headers are sent from the server hosting the image? For example, the codercat image from GitHub specifies an etag, an expires timestamp, and a cache-control header:
% curl -I https://octodex.github.com/images/codercat.jpg
HTTP/2 200
etag: "64f0b60d-70bf"
expires: Sun, 08 Sep 2024 16:54:00 GMT
cache-control: max-age=600
Those are what allow imageproxy to know how long it can cache the image. What happens if you try to load the codercat image in your proxy? Is it being served from cache? If so, then take a look at the response headers from the remote image you are loading to see if it has similar caching headers.
I've configureD imageproxy WITH with caching to disk:
When I request the image, it's downloaded, stored on disk, resized and the resized image is also stored on disk (I can see the files in the data folder).
However in the logs I see that cache was not used when I request the same image again. Note that the image url I'm requesting contains query string parameters.