-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check JavaScript files content type. #1802
Conversation
debug_toolbar/apps.py
Outdated
Check that JavaScript files are resolving to the correct content type. | ||
""" | ||
javascript_types = { | ||
# Macs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe Linux, macOS
? Or Unices
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section confuses me. I put those comments there because on my mac, I found that mimetypes was returning application/javascript, but the windows solution was to use text/javascript.
I couldn't reproduce what windows users would actually experience for this. Or at least not easily.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I installed python on my windows machine, which was easier than expected. We should check for text/javascript, but we should recommend that users use a value of application/javascript instead. I'll clean this up to reflect that.
A common problem with windows set ups is that the registry is misconfigured when resolving the content type for a JavaScript file. This check captures this sooner to explain why the toolbar doesn't show and attempts to tell the user what to change to make it work.
Co-authored-by: Matthias Kestenholz <[email protected]>
@matthiask alright, if you're okay with the latest changes let's merge them. |
Yes, thank you! |
A common problem with windows set ups is that the registry is misconfigured when resolving the content type for a JavaScript file. This check captures this sooner to explain why the toolbar doesn't show and attempts to tell the user what to change to make it work.
Fixes #1764
Checklist:
docs/changes.rst
.