made addCORS global middleware