Add crossDomain middleware which allows cross domain requests for certain routes
Rearrange publicly exposed api endpoints and add cross domain support to them