Fixes to allow cross domain resource sharing with AngularJS consumers of the JSON API