Added cross origin functionality and the ability to pass in request headers