Skip to content


Subversion checkout URL

You can clone with
Download ZIP


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

wants to merge 1 commit into from

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.

@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.


@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');


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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 27, 2012
  1. @mboersma

    Update lib/node-static/mime.js

    mboersma authored
    Add mime type for Web Open Font Format files.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/node-static/mime.js
1  lib/node-static/mime.js
@@ -131,6 +131,7 @@ exports.contentTypes = {
"wma": "audio/x-ms-wma",
"wmv": "video/x-ms-wmv",
"wmx": "video/x-ms-wmx",
+ "woff": "application/font-woff",
"wrl": "model/vrml",
"wvx": "video/x-ms-wvx",
"xbm": "image/x-xbitmap",
Something went wrong with that request. Please try again.