visionmedia / express-resource

Resourceful routing for Express
1.41k stars 140 forks source link

Ability to use content-negotiation only for known formats #28

Open Swatinem opened 13 years ago

Swatinem commented 13 years ago

My usecase is as follows: I want my resource Ids/Names to be human readable, with all the special chars and dots they include. I do have a “champions/Dr. Mundo.png” Thanks to the patch in pull request 27, it does work now when I include a format. So “Dr. Mundo.png” becomes “Dr. Mundo”. Same for .json.

But I want to use “champions/Dr. Mundo” as URL without any appended format, showing the default html. I could just make it “champions/Dr. Mundo.html” but I don’t want to have that ugly .html everywhere.

So I want the format to be either .png or .json, but not mess up my resource Id otherwise.

tj commented 13 years ago

yeah I'd like to remove the format content-negotiation stuff, or whitelist like you say, it's too brittle