CORS issue ?

Hi All
i think i have a cors issue, but I am not 100% sure because i get a generic error back.

ok my setup is as follows:
  • i have a cloud flare tunnel
  • inside of the tunnel runs a small angular application
  • application and public hostname were set
so i can reach my application and it works as expected in general.
i have implemented in this application an API call towards cloudflare:
https://api.cloudflare.com/client/v4/zones/*zone code/access/groups/group key*

i tested the payload and url with curl, and i had no issues.

So the first thing which was thrown by the browser was a CORS error. Then i adapted the application (see printscreen). i enabled CORS and set the application domain (www.example.com) in Access-Control-Allow-Origin and allow for testing the two other options.

so the error in the browser was gone and i get a new more general error:
{
    "headers": {
        "normalizedNames": {},
        "lazyUpdate": null,
        "headers": {}
    },
    "status": 0,
    "statusText": "Unknown Error",
    "url": "https://api.cloudflare.com/client/v4/zones/*zone code*/access/groups/*group key*",
    "ok": false,
    "name": "HttpErrorResponse",
    "message": "Http failure response for https://api.cloudflare.com/client/v4/zones/*zone code*/access/groups/*group key*: 0 Unknown Error",
    "error": {
        "isTrusted": true
    }
}

for me it looks like the cloudflare api will block it.
image.png
Was this page helpful?