Add charset=UTF-8

This commit is contained in:
Leo Vasanko 2023-11-01 17:32:48 +00:00
parent bdc0bbd44f
commit 0d6180e8a4

View File

@ -96,6 +96,10 @@ def _load_wwwroot(www):
if name in www and www[name][2]["etag"] == etag: if name in www and www[name][2]["etag"] == etag:
wwwnew[name] = www[name] wwwnew[name] = www[name]
continue continue
# Add charset definition
if mime.startswith("text/"):
mime = f"{mime}; charset=UTF-8"
# Asset files names will change whenever the content changes
cached = name.startswith("assets/") cached = name.startswith("assets/")
headers = { headers = {
"etag": etag, "etag": etag,