adding check for CORS support