|
@@ -8,33 +8,37 @@
|
|
|
|
|
|
# cache.appcache, your document html and data
|
|
# cache.appcache, your document html and data
|
|
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
|
|
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
|
|
- expires -1;
|
|
|
|
|
|
+ expires -1;
|
|
}
|
|
}
|
|
|
|
|
|
# Feeds
|
|
# Feeds
|
|
location ~* \.(?:rss|atom)$ {
|
|
location ~* \.(?:rss|atom)$ {
|
|
- expires 1h;
|
|
|
|
- add_header Cache-Control "public";
|
|
|
|
|
|
+ expires 1h;
|
|
|
|
+ add_header Cache-Control "public";
|
|
|
|
+ add_header X-Content-Type-Options "nosniff";
|
|
}
|
|
}
|
|
|
|
|
|
# Media: images, icons, video, audio, HTC
|
|
# Media: images, icons, video, audio, HTC
|
|
location ~* \.(?:jpg|jpeg|gif|png|ico|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
|
|
location ~* \.(?:jpg|jpeg|gif|png|ico|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
|
|
- expires 1M;
|
|
|
|
- access_log off;
|
|
|
|
- add_header Cache-Control "public";
|
|
|
|
|
|
+ expires 1M;
|
|
|
|
+ access_log off;
|
|
|
|
+ add_header Cache-Control "public";
|
|
|
|
+ add_header X-Content-Type-Options "nosniff";
|
|
}
|
|
}
|
|
|
|
|
|
# Web fonts
|
|
# Web fonts
|
|
-location ~* \.(?:ttf|ttc|otf|eot|woff)$ {
|
|
|
|
|
|
+location ~* \.(?:ttf|ttc|otf|eot|woff|woff2)$ {
|
|
expires 1M;
|
|
expires 1M;
|
|
access_log off;
|
|
access_log off;
|
|
add_header Cache-Control "public";
|
|
add_header Cache-Control "public";
|
|
add_header "Access-Control-Allow-Origin" "*";
|
|
add_header "Access-Control-Allow-Origin" "*";
|
|
|
|
+ add_header X-Content-Type-Options "nosniff";
|
|
}
|
|
}
|
|
|
|
|
|
# CSS and Javascript
|
|
# CSS and Javascript
|
|
location ~* \.(?:css|js)$ {
|
|
location ~* \.(?:css|js)$ {
|
|
- expires 2M;
|
|
|
|
- access_log off;
|
|
|
|
- add_header Cache-Control "public";
|
|
|
|
|
|
+ expires 2M;
|
|
|
|
+ access_log off;
|
|
|
|
+ add_header Cache-Control "public";
|
|
|
|
+ add_header X-Content-Type-Options "nosniff";
|
|
}
|
|
}
|