CORS/JSONP preparation