Update cachable type list

This commit is contained in:
shortcutme 2019-10-28 16:43:37 +01:00
parent cb4a4bd707
commit 8dfc200f24
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -300,8 +300,9 @@ class UiRequest(object):
headers["Content-Disposition"] = "attachment" headers["Content-Disposition"] = "attachment"
cacheable_type = ( cacheable_type = (
content_type == "text/css" or content_type.startswith("image") or content_type.startswith("video") or self.env["REQUEST_METHOD"] == "OPTIONS" or
self.env["REQUEST_METHOD"] == "OPTIONS" or content_type == "application/javascript" content_type.split("/", 1)[0] in ("image", "video", "font") or
content_type in ("application/javascript", "text/css")
) )
if status in (200, 206) and cacheable_type: # Cache Css, Js, Image files for 10min if status in (200, 206) and cacheable_type: # Cache Css, Js, Image files for 10min