anasfik / replicate

A community-maintained Dart client package for Replicate.com, this package let you interact with Replicate.com APIs and create predictions from the available machine learning models.
https://replicate.com/
MIT License
10 stars 10 forks source link

CORS Issue when calling from localhost #7

Open pgainullin opened 3 months ago

pgainullin commented 3 months ago
Access to XMLHttpRequest at 'https://api.replicate.com/v1/predictions' from origin 'http://localhost:#####' has been blocked by 
CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on 
the requested resource.

One solution could be to add a proxy URL when authenticating Replicate