-
Notifications
You must be signed in to change notification settings - Fork 28
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
fileServer doesn't set content-type header #42
Comments
All right. Having Hyper guess MIME types based on file extensions seems like something we'd regret later. Perhaps some lookup table that is user-configurable, like with Nginx *https://github.com/h5bp/server-configs-nginx/blob/master/mime.types)? |
yeah, something like that would probably be best. like a default set and then the user could pass in their own record of how to handle stuff |
I'm very tight on time currently. If you need it soon, would you like to send a PR? Thanks! |
no rush! it's just on my vidtracker and i'm handling css requests separately for now |
I've added simple lookup table for mime types: https://github.com/owickstrom/hyper/blob/master/src/Hyper/Node/FileServer.purs#L28 We can break API in next release and allow users to pass their own table too if that is not enough. @justinwoo, @owickstrom Can I close it? |
Looks like a good start @paluh. 👍 And yeah, let's make it a parameter when needed. |
for things like CSS files, the content-type needs to be written as text/css for Chrome to actually use it as a stylesheet, it seems.
The text was updated successfully, but these errors were encountered: