]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: add text/javascript to gzip mime types 70625/head
authorAfreen Misbah <afreen@ibm.com>
Tue, 28 Jul 2026 12:47:56 +0000 (18:17 +0530)
committerAfreen Misbah <afreen@ibm.com>
Tue, 28 Jul 2026 13:43:55 +0000 (19:13 +0530)
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 <afreen@ibm.com>
src/pybind/mgr/dashboard/module.py

index 7b7bb3b77de1ea0c3067fd5098f740daacf2bfa3..e890e972bd48f43eb2ea4f43f54f451317da2ae1 100644 (file)
@@ -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,