Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StackBlitz API calls to Replicate blocked by Replicate #3255

Open
AvdMei opened this issue Jan 26, 2025 · 0 comments
Open

StackBlitz API calls to Replicate blocked by Replicate #3255

AvdMei opened this issue Jan 26, 2025 · 0 comments

Comments

@AvdMei
Copy link

AvdMei commented Jan 26, 2025

Description of Bug

Using StackBlitz to build a Next.js app leads to a blocking of API calls to Replicate.

Steps to Reproduce

  1. Go to 'Next.js starter template'. Build API call to replicate.
  2. See error below

Expected Behavior

A running POST request throught the Replicate API.

Screenshots/Screencast

Access to fetch at 'https://api.replicate.com/v1/predictions' from origin 'https://stackblitzstarterXXXYYYZZZ.w-credentialless-staticblitz.com' 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. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Additional Context/Questions
Have been troubleshooting this for a few hours, seems to be the problem that Replicate.com recognises the StackBlitz request as not coming from the server side or similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant