Merge 8e62c19fcac0df364721ecbd1649dd485f96debe into ecdc849232ac3a733709a5f55ec32352c2f244f1
This commit is contained in:
commit
8e29abad88
@ -5,4 +5,10 @@ sendfile on;
|
||||
tcp_nopush on;
|
||||
|
||||
# Don't wait to send data in keep-alive state.
|
||||
tcp_nodelay on;
|
||||
tcp_nodelay on;
|
||||
|
||||
# Check if web browser supports WebP images
|
||||
map $http_accept $webp_suffix {
|
||||
default "";
|
||||
"~*webp" ".webp";
|
||||
}
|
||||
@ -8,8 +8,14 @@ location ~* \.(?:rss|atom)$ {
|
||||
expires 1h;
|
||||
}
|
||||
|
||||
# Use the WebP version of converted PNG/JPEG images
|
||||
location ~* ^.+\.(png|jpe?g)$ {
|
||||
add_header Vary Accept;
|
||||
try_files $uri$webp_suffix $uri =404;
|
||||
}
|
||||
|
||||
# Caches images, icons, video, audio, HTC, etc.
|
||||
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|mp4|ogg|ogv|webm|htc)$ {
|
||||
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|mp4|ogg|ogv|webm|htc|webp)$ {
|
||||
expires 1y;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user