I'm using a location config like this in Nginx for serving WEBP when the user supports it
map $http_accept $webp_suffix {
default "";
"~*webp" ".webp";
}
server {
#...
location ~* \.(?:jpg|jpeg|png|webp)$ {
root /usr/share/nginx/html;
try_files $uri$webp_suffix $uri =404;
}
#...
}
my problem is that I want to use the same strategy but when I'm using an object-storage (Minio - S3 compatible)
so I'm wondering what is the best way to replace this part:
try_files $uri$webp_suffix $uri =404;
with something like
try_proxy_pass http://minio$uri$webp_suffix http://minio$uri =404;