Rev1799, Force correct css content type
This commit is contained in:
parent
9d5bfa4be8
commit
5c2b90c20f
2 changed files with 5 additions and 1 deletions
|
@ -9,7 +9,7 @@ class Config(object):
|
|||
|
||||
def __init__(self, argv):
|
||||
self.version = "0.5.1"
|
||||
self.rev = 1797
|
||||
self.rev = 1799
|
||||
self.argv = argv
|
||||
self.action = None
|
||||
self.config_file = "zeronet.conf"
|
||||
|
|
|
@ -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…
Reference in a new issue