Rev1799, Force correct css content type

This commit is contained in:
shortcutme 2017-01-05 02:33:33 +01:00
parent 9d5bfa4be8
commit 5c2b90c20f
2 changed files with 5 additions and 1 deletions

View file

@ -99,6 +99,10 @@ class UiRequest(object):
# Get mime by filename
def getContentType(self, file_name):
content_type = mimetypes.guess_type(file_name)[0]
if file_name.endswith("css"): # Force correct css content type
content_type = "text/css"
if not content_type:
if file_name.endswith("json"): # Correct json header
content_type = "application/json"