Update lib/node-static/mime.js #75

Closed
wants to merge 1 commit into
from

Projects

None yet

4 participants

Add mime type for Web Open Font Format files.

@mboersma mboersma Update lib/node-static/mime.js
Add mime type for Web Open Font Format files.
1959758
Collaborator
phstc commented Dec 21, 2012

@kirkaustin with application/x-font-woff it works on Chrome?

Yes. But please ignore this pull request if you're in doubt. It's a trivial issue and I didn't realize the MIME type wasn't totally settled.

Well, ultimately it might be worthwhile exposing the map so that users could add other mime types programmatically instead of tweaking the file itself.

It's pretty easy to test in Chrome, though. The other browsers don't seem to care.

@phstc phstc added a commit that referenced this pull request Dec 22, 2012
@phstc phstc Allows dynamic addition of content types #75 fa3d5de
Collaborator
phstc commented Dec 22, 2012

@kirkaustin what do you think?

static.mime.addContentType('woff', 'application/font-woff');

Brilliant! Many thanks.
Of course, I'll be doing:
static.mime.addContentType('woff', 'application/x-font-woff');

domenic commented Dec 22, 2012

Just depend on mime and be done with it?

I'd prefer not to.
Fewer dependencies is better.
Lean and mean
Less is more.
If you'd prefer mime, you might also prefer using Express instead of node-static.

@phstc phstc closed this Feb 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment