-
Notifications
You must be signed in to change notification settings - Fork 84
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
build with wasm target works, but fail to run because CORS #167
Comments
@derust - I will check with the API team internally and see if this is intentional, or a configuration on a per-endpoint basis. Thanks for reporting, and sorry for the delay! If this is blocking you, would it be possible in your system to add a Cloudflare Worker as a minimal proxy between your client and the Cloudflare API? |
👋 we don't currently have CORS support on the API but i'd be interested in how you were thinking about doing this because if you need CORS, that also means you're doing this in the frontend/browser and exposing your credentials at the same time (as all the endpoints are authenticated). If you're using a frontend/backend combo, you'll want to move this to the backend and have it make the requests working around the need for CORS. |
@nilslice @jacobbednarz the credentials is saved locally and never leaves users browser If there is no CORS restriction , the wasm version of this crate will be more useful |
thanks, i'll add a note to our internal ticket of your use case but i can't guarantee whether this will change or provide an ETA on when this will land if it's decided on. |
Access to fetch at 'https://api.cloudflare.com/client/v4/zones' from origin 'http://lo:8000' 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.
Do api.cloudflare.com have any setting to bypass CORS restriction?
The text was updated successfully, but these errors were encountered: