New conf
This commit is contained in:
parent
033fc3840b
commit
0b418f0d41
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user