How fix Internal 500?

I ran into a problem that when I uploaded my site to CloudFlare Pages it started giving an internal 500, this is just an API wrapper, here is the code
No description
7 Replies
Юнито
Юнито9mo ago
No description
Юнито
Юнито9mo ago
No description
Юнито
Юнито9mo ago
On localhost I don't have this problem and everything works fine, help please
kian
kian9mo ago
Remove { mode: 'no-cors' } It's probably that
Юнито
Юнито9mo ago
All right, I'll give it a try. Access to fetch at 'https://api.unitovsk.fun/profile/1154056951903289436/910420722432765963' from origin 'http://localhost:5173' has been blocked by CORS policy: 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.
kian
kian9mo ago
I was referring to the Worker/Functions code
Юнито
Юнито9mo ago
my API is written in Python (FastAPI) ? Thanks you, I love you bro :) Its works