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 @@ -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 and .js files, causing browsers to
1624+ # reject these files. 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 ):
You can’t perform that action at this time.
0 commit comments