move CORS checking code our of the export
removed extra Core namespace