New conf
This commit is contained in:
@ -1,10 +1,10 @@
|
|||||||
map $http_accept $webp_suffix {
|
# map $http_accept $webp_suffix {
|
||||||
default "";
|
# default "";
|
||||||
"~*webp" ".webp";
|
# "~*webp" ".webp";
|
||||||
}
|
# }
|
||||||
types {
|
# types {
|
||||||
image/webp webp;
|
# image/webp webp;
|
||||||
}
|
# }
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
@ -22,10 +22,10 @@ server {
|
|||||||
add_header Cache-Control "public, no-transform";
|
add_header Cache-Control "public, no-transform";
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* ^.+\.(png|jpg|jpeg)$ {
|
# location ~* ^.+\.(png|jpg|jpeg)$ {
|
||||||
add_header Vary Accept;
|
# add_header Vary Accept;
|
||||||
try_files $uri$webp_suffix $uri =404;
|
# try_files $uri$webp_suffix $uri =404;
|
||||||
}
|
# }
|
||||||
|
|
||||||
|
|
||||||
error_page 404 /404.html;
|
error_page 404 /404.html;
|
||||||
|
Reference in New Issue
Block a user