Skip to content

Commit 19c6cbb

Browse files
committed
Fix incorrect MIME type for JavaScript
1 parent 9560e0c commit 19c6cbb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

notebook/notebookapp.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,10 +1619,12 @@ def init_server_extensions(self):
16191619

16201620
def init_mime_overrides(self):
16211621
# On some Windows machines, an application has registered an incorrect
1622-
# mimetype for CSS in the registry. Tornado uses this when serving
1623-
# .css files, causing browsers to reject the stylesheet. We know the
1624-
# mimetype always needs to be text/css, so we override it here.
1622+
# mimetype for CSS and JavaScript in the registry.
1623+
# Tornado uses this when serving .css files, causing browsers to reject the stylesheet.
1624+
# We know the mimetype always needs to be text/css for css
1625+
# and application/javascript for JS, so we override it here.
16251626
mimetypes.add_type('text/css', '.css')
1627+
mimetypes.add_type('application/javascript', '.js')
16261628

16271629

16281630
def shutdown_no_activity(self):

0 commit comments

Comments
 (0)