Skip to content

Commit

Permalink
Add correct mimetype for .mjs files
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei committed Apr 28, 2024
1 parent ddb28b3 commit 3d3fc81
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
# this is a fix for Windows users. Without it, javascript files will be served with text/html content-type and the browser will not show any UI
mimetypes.init()
mimetypes.add_type('application/javascript', '.js')
mimetypes.add_type('application/javascript', '.mjs')

# Likewise, add explicit content-type header for certain missing image types
mimetypes.add_type('image/webp', '.webp')
Expand Down

0 comments on commit 3d3fc81

Please sign in to comment.