Update cachable type list
This commit is contained in:
parent
cb4a4bd707
commit
8dfc200f24
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue