Closed panosru closed 12 years ago
I see this is related to #38
ideally they are whitelisted since there's an infinite possibility of extensions really. However it's easy to a) add express.static()
above app.router
, or add app.use(function(req, res, next){ my 404 stuff here })
below app.router
and all the other middleware
@visionmedia this is what I have now and is not working for me... if you check my application index you will see that I call App.static()
before the router and the handler after the router...
add a function after ErrorHandler.handle, if connect is responding with "Cannot GET /whatever" etc you can respond in that function
@visionmedia ok I used it in another way, some-how like you proposed with a fn after ErrorHandler.handle method. :)
I used to set
app.all('/*', function (req, res, next) ...
as my last route in order to handle routes that are not found, it used to work fine but now that I use express-resource it seems that static content like.css
,.js
,.jpg
are processed by the router without express-resource they are not processed andapp.all('/*'...
handles not found routes properly