Set MIME type for javascript files

This commit is contained in:
Henrik Giesel 2020-10-26 23:32:38 +01:00
parent 06292a45f3
commit 70aed820da

View file

@ -131,6 +131,8 @@ def allroutes(pathin):
if fullpath.endswith(".css"):
# some users may have invalid mime type in the Windows registry
mimetype = "text/css"
elif fullpath.endswith(".js"):
mimetype = "application/javascript"
else:
# autodetect
mimetype = None