Fixes: #35 (closed)
There's a CORS library that makes doing this simpler. At the same time, this middleware-based approach is incomplete because it doesn't account for exceptions.