From: Afreen Misbah Date: Tue, 28 Jul 2026 12:47:56 +0000 (+0530) Subject: mgr/dashboard: add text/javascript to gzip mime types X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3a081d5cd0fb9de46d36f7d93176256cd6b5253b;p=ceph.git mgr/dashboard: add text/javascript to gzip mime types CherryPy's serve_file() uses Python's mimetypes module which returns text/javascript for .js files (RFC 9239), but the gzip config only listed application/javascript. This meant the main Angular bundle was being served uncompressed. With Cheroot write timeouts, the uncompressed transfer times out over slower networks, causing ERR_CONTENT_LENGTH_MISMATCH in the browser. Signed-off-by: Afreen Misbah --- diff --git a/src/pybind/mgr/dashboard/module.py b/src/pybind/mgr/dashboard/module.py index 7b7bb3b77de1..e890e972bd48 100644 --- a/src/pybind/mgr/dashboard/module.py +++ b/src/pybind/mgr/dashboard/module.py @@ -106,7 +106,8 @@ class CherryPyConfig(object): 'tools.gzip.on': True, 'tools.gzip.mime_types': [ 'text/html', 'text/plain', 'application/json', - 'application/*+json', 'application/javascript', 'text/css' + 'application/*+json', 'application/javascript', + 'text/javascript', 'text/css' ], 'tools.json_in.on': True, 'tools.json_in.force': True,