Rev1799, Force correct css content type
This commit is contained in:
parent
9d5bfa4be8
commit
5c2b90c20f
2 changed files with 5 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue