Adding a check to see if CORS is enabled.