Trying to access API from a worker web app. I get CORS reject. I use RUST or Typescript.

How do I access cloudflare API from a program with getting a CORS issue?
5 Replies
Cyb3r-Jak3
Cyb3r-Jak33mo ago
The API is designed to not be used directly from a browser so you need to proxy the commands to something else
SysEng
SysEngOP3mo ago
How do you proxy the requests? i can setup any proxy if i know where to proxy from
Cyb3r-Jak3
Cyb3r-Jak33mo ago
You would have to have an application that you host that supports CORS it could be a worker
SysEng
SysEngOP3mo ago
I wrote a worker that tries to access the API, but it has a CORS problem. How does a worker access the API? I wrote a proxy in rust and it works
Cyb3r-Jak3
Cyb3r-Jak33mo ago
Can you share you workers code. It should work from worker to cloudflare API.

Did you find this page helpful?