File tree 2 files changed +15
-13
lines changed
2 files changed +15
-13
lines changed Original file line number Diff line number Diff line change 1
1
<IfModule expires_module>
2
2
#设置浏览器端缓存
3
3
ExpiresActive on
4
- #缓存时长7200000 /3600/24=83天
5
- ExpiresByType text/css A7200000
6
- ExpiresByType application/x-javascript A7200000
7
- ExpiresByType application/javascript A7200000
8
- ExpiresByType text/plain A7200000
9
- # ExpiresByType text/html A7200000
10
- ExpiresByType image/jpeg A7200000
11
- ExpiresByType image/gif A7200000
12
- ExpiresByType image/png A7200000
13
- ExpiresByType image/x-icon A7200000
14
- ExpiresByType font/ttf A7200000
15
- ExpiresByType font/woff A7200000
4
+ #缓存时长604800 /3600/24=7天
5
+ ExpiresByType text/css A604800
6
+ ExpiresByType application/x-javascript A604800
7
+ ExpiresByType application/javascript A604800
8
+ ExpiresByType text/plain A604800
9
+ ExpiresByType image/jpeg A604800
10
+ ExpiresByType image/gif A604800
11
+ ExpiresByType image/png A604800
12
+ ExpiresByType image/x-icon A604800
13
+ ExpiresByType font/ttf A2592000
14
+ ExpiresByType font/woff A2592000
15
+ ExpiresByType font/woff2 A2592000
16
16
</IfModule>
17
17
WSGIApplicationGroup %{GLOBAL}
18
18
WSGIPassAuthorization On
Original file line number Diff line number Diff line change @@ -260,7 +260,9 @@ def search_mdd(self):
260
260
261
261
if mime_type .startswith ('image/' ):
262
262
# 判断图片真实类型
263
- mime_type = 'image/' + imghdr .what (None , res_content )
263
+ img_type = imghdr .what (None , res_content )
264
+ if img_type is not None :
265
+ mime_type = 'image/' + img_type
264
266
265
267
if mime_type == 'image/tiff' :
266
268
im = Image .open (BytesIO (res_content ))
You can’t perform that action at this time.
0 commit comments