Just a collection of middlewares that i use from time to time.
better to have them here all together.
turns the path to lowercase, sometimes is useful to make no distintion between /blog/posts
and /Blog/Posts
.
cors allow everything, useful for debugging (use https://github.com/rs/cors for prod please).
sets the Content-Type
header to application/json
simple basic auth middleware, pass handler and a string in the format of user:password
, only supports 1 user.