From 7bb89e9e7eb59fa7dd959025cec9f2057a00c464 Mon Sep 17 00:00:00 2001 From: gitea Date: Sun, 21 Feb 2021 06:11:21 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20'staticfiles.conf'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- staticfiles.conf | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/staticfiles.conf b/staticfiles.conf index 2cdbc5a..cd79163 100644 --- a/staticfiles.conf +++ b/staticfiles.conf @@ -1,18 +1,10 @@ -rewrite ^(.*)\.(\d+)\.(css|js)$ $1.$3 break; + location ~* \.(jpg|jpeg|gif|png|svg|ico)$ { access_log off; expires max; log_not_found off; error_page 404 = /empty; - - #location ~ ^/\d*.jpg$ { - # default_type 'image/jpeg'; - # content_by_lua_file image.lua; - #} } -#location ~ ^/\d*.html$ { -# rewrite_by_lua_file redirect_to_product.lua; -#} location = /empty { expires 0; empty_gif; @@ -21,12 +13,12 @@ location ~* \.(eot|ttf|woff|pdf|css|js)$ { access_log off; expires max; } -#location ~* \.(xml|xls)$ { -# add_header Cache-Control "no-cache"; -#} +location ~* \.(xml|xls)$ { + add_header Cache-Control "no-cache"; +} location ~ /\. { deny all; } -location ~* \.(tpl|ini|sh) { +location ~* \.(tpl|ini|sh|conf|example) { deny all; }