Skip to content
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

Configure additional mime types #35

Closed
olegomon opened this issue Jun 20, 2013 · 23 comments · Fixed by #693
Closed

Configure additional mime types #35

olegomon opened this issue Jun 20, 2013 · 23 comments · Fixed by #693
Milestone

Comments

@olegomon
Copy link

add mime type support to enable streaming of video files with html 5 video tag

@codydjango
Copy link

Yes, I'd like to be able to configure additional content types as well.

For instance, text/cache-manifest for .manifest files. Seems to work fine in chrome either way, but I imagine there are other use cases for this feature.

@mmalecki
Copy link
Contributor

mmalecki commented Oct 7, 2013

+1, would love it for .webapp. Pull requests would be welcome!

@danielmahon

This comment has been minimized.

@ckapop
Copy link

ckapop commented Jun 23, 2014

Any news on HTML 5 video support?

@mrthan
Copy link

mrthan commented Aug 14, 2014

+1 I'm trying to test m3u8 HLS playlists and need to set the mime type

@Baccanno
Copy link

Baccanno commented Oct 7, 2014

+1 Resource interpreted as Stylesheet but transferred with MIME type application/octet-stream: "http://localhost:8080/less/main.less".

@ralyodio
Copy link

also .less is not supported +1 for that.

@dotnetCarpenter
Copy link

I'll give it a shot. Just got an API implemented in the upstream ecstatic. If it gets accepted and I'm successful here... well, then it's done.

@dotnetCarpenter
Copy link

Can someone give me a hand with #152?
I can't figure out how to test the feature with vows. If I start http-server, I can request files with custom mime-types but no matter what I do in http-server-test.js, I get an ECONNREFUSED. I'm pretty sure it's a race condition but I can't figure out how to fix it.

Any ideas?

@timdp
Copy link

timdp commented Jul 1, 2015

It'd also be nice if we could map .mpd to application/dash+xml for MPEG-DASH.

@stowball
Copy link

I would love to be able to serve SVGs correctly using the MIME type images/svg+xml

@BigBlueHat
Copy link
Member

#152 just needs tests afaict. If anyone wants to right those, I'd be 👍 for merging that. Setting media types correctly is rather essential--and ecstatic already supports a way to set the mappings (between extension and media type) properly. So. Who's up for writing tests?! 😁

@75lb
Copy link

75lb commented Jul 13, 2017

MIME types can be customised in local-web-server, is that the kind of behaviour you're looking for?

@grokify
Copy link

grokify commented Sep 18, 2018

+1 for SVG and/or customizable approach similar local-web-server.

@disfeng

This comment has been minimized.

@anderspitman
Copy link

Just want to chime in that lack of WebAssembly mime is forcing me to look for an alternative local server. http-server has beautifully handled all my needs up to this point and I'd hate to switch if I don't have to.

@paulmelnikow
Copy link
Contributor

@anderspitman Did you find another option? At some point I switched from http-server to serve, but it has the same limitation.

@anderspitman
Copy link

@paulmelnikow I've been using https://crates.io/crates/https. That page includes installation instructions for non Rust developers as well.

@yiminghe
Copy link

yiminghe commented Jun 9, 2021

https://crates.io/crates/https: http -m wasm:application/wasm

@thornjad thornjad mentioned this issue Jul 12, 2021
2 tasks
@thornjad thornjad added this to the v0.13.0 milestone Jul 13, 2021
@ddennedy
Copy link

ddennedy commented Jan 4, 2022

In case you landed here to figure out how to use the --mimetypes command line option and the syntax of its file, see here: https://github.com/jfhbrook/node-ecstatic#--mime-types-filename
(However, note that the option is not --mime-types in http-server!)
For example,

$ cat hls/mime.types
ecstatic({ mimeTypes: { 'application/vnd.apple.mpegurl': ['m3u8'] } })

@acxz
Copy link

acxz commented Sep 9, 2022

@ddennedy I'm afraid that didn't seem to change anything for me

@mtozlu
Copy link

mtozlu commented Jan 1, 2023

Example mime type file can be found here;
https://github.com/http-party/http-server/blob/93fbb755fe55aa13878af9a91bc8e1a274522dbe/test/fixtures/custom_mime_type.types

@dsoudakov
Copy link

In case you landed here to figure out how to use the --mimetypes command line option and the syntax of its file, see here: https://github.com/jfhbrook/node-ecstatic#--mime-types-filename (However, note that the option is not --mime-types in http-server!) For example,

$ cat hls/mime.types
ecstatic({ mimeTypes: { 'application/vnd.apple.mpegurl': ['m3u8'] } })

Simply creating a custom.types file with "type ext1 ext2" works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.