Middleware for adding Access-Control-Allow-Origin header
Don't add Access-Control-Allow-Origin for unsupported origin
Renamed test functions to be more compact
Don't use threaded macro
Add Access-Control-Allow-Headers: Content-Type to valid responses
Wrap all valid responses around cors middleware

Adds Access-Control-Allow-Origin and Access-Control-Allow-Headers
to responses when request is valid. No need to have custom respond
functions or whatnot.
Use regex to match allowed origins