removed static webp and did some nginx conf
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
map $http_accept $webp_suffix {
|
||||
"~*webp" ".webp" ;
|
||||
}
|
||||
default "";
|
||||
"~*webp" ".webp";
|
||||
}
|
||||
types {
|
||||
image/webp webp;
|
||||
}
|
||||
@ -13,12 +14,17 @@ server {
|
||||
#access_log /var/log/nginx/host.access.log main;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
expires 1y;
|
||||
etag off;
|
||||
if_modified_since off;
|
||||
add_header Cache-Control "public, no-transform";
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
expires 1y;
|
||||
etag off;
|
||||
if_modified_since off;
|
||||
add_header Cache-Control "public, no-transform";
|
||||
}
|
||||
|
||||
location ~* ^.+\.(png|jpg|jpeg)$ {
|
||||
add_header Vary Accept;
|
||||
try_files $uri$webp_suffix $uri =404;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user