File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1581,10 +1581,12 @@ def init_server_extensions(self):
15811581
15821582 def init_mime_overrides (self ):
15831583 # On some Windows machines, an application has registered an incorrect
1584- # mimetype for CSS in the registry. Tornado uses this when serving
1585- # .css files, causing browsers to reject the stylesheet. We know the
1586- # mimetype always needs to be text/css, so we override it here.
1584+ # mimetype for CSS and JavaScript in the registry.
1585+ # Tornado uses this when serving .css and .js files, causing browsers to
1586+ # reject these files. We know the mimetype always needs to be text/css for css
1587+ # and application/javascript for JS, so we override it here.
15871588 mimetypes .add_type ('text/css' , '.css' )
1589+ mimetypes .add_type ('application/javascript' , '.js' )
15881590
15891591
15901592 def shutdown_no_activity (self ):
You can’t perform that action at this time.
0 commit comments