Merge pull request #804 from hgiesel/mime

Set MIME type for javascript files
This commit is contained in:
Damien Elmes 2020-10-29 20:54:03 +10:00 committed by GitHub
commit 8ef6420cdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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