Cleaned up CORS check and fallback.