Accessing API endpoint with CORS restrictions