3 ms·
Well done! This has a really clean interface, I wish I'd come across it when looking for a simple router a few weeks ago. A lot of the other ones lean heavily t
by mmcnickle 14y ago
Well done! This has a really clean interface, I wish I'd come across it when looking for a simple router a few weeks ago. A lot of the other ones lean heavily towards a style associated with their related framework, or are too esoteric/basic.
There are a few things I would have to add before I would use it however, and I hope they make it in some day:
1) You should add a whitelist for the HTTP request method names, i.e only allow calls to get(), post(), not some_suspicious_call_from_bad_user(). People will often put non HTTP methods in their views (view as in django sense) and you don't want them to be able to be called by a malicious user.
2) You should make it easy for the developer to configure their own xhr headers.
3) Nitpick: You should probably use 405 (Method Not Allowed) instead of 404 for when a method handler isn't found.
Maybe I'll use it in this project, in which case you may have a few pull requests headed your way!
- jasonmoo 14y agoWow fantastic code review! I'm a minor contributor on this project and those changes sound great.