This commit is contained in:
Steffen Illium 2023-12-24 15:22:21 +01:00 committed by Steffen Illium
parent 033fc3840b
commit 0b418f0d41

View File

@ -1,10 +1,10 @@
map $http_accept $webp_suffix {
default "";
"~*webp" ".webp";
}
types {
image/webp webp;
}
# map $http_accept $webp_suffix {
# default "";
# "~*webp" ".webp";
# }
# types {
# image/webp webp;
# }
server {
listen 80;
@ -22,10 +22,10 @@ server {
add_header Cache-Control "public, no-transform";
}
location ~* ^.+\.(png|jpg|jpeg)$ {
add_header Vary Accept;
try_files $uri$webp_suffix $uri =404;
}
# location ~* ^.+\.(png|jpg|jpeg)$ {
# add_header Vary Accept;
# try_files $uri$webp_suffix $uri =404;
# }
error_page 404 /404.html;