From 3d3fc81f4858cae75fa33e55e7b88ede853d28ae Mon Sep 17 00:00:00 2001 From: huchenlei Date: Sun, 28 Apr 2024 16:14:12 -0400 Subject: [PATCH] Add correct mimetype for .mjs files --- modules/ui.py | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/ui.py b/modules/ui.py index 403425f29..c6c058fea 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -38,6 +38,7 @@ warnings.filterwarnings("default" if opts.show_gradio_deprecation_warnings else # 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')