Add CORS support, fix response code in dispatch

Signed-off-by: Eli Skeggs <skeggse@gmail.com>