ok I was able to finally sort it out. But this seems like a super hacky workaround, there has to be

ok I was able to finally sort it out. But this seems like a super hacky workaround, there has to be a way to do without my current doings..... (worker sites had the exact use-case I am looking for right now).

Basically in Astro I created an /api/[...request].js route (which is an api route) in my
pages
folder.
The content is pretty simple:
export async function GET({ params }) {
  const backendRequest = await fetch(
    "https://dashboard.ruxiom.dev/api/" + params.request,
    {
      headers: {
        "CF-Access-Client-Id": "something.access",
        "CF-Access-Client-Secret":
          "something different",
      },
    }
  );

  return backendRequest.clone();
}


As you can see I had to add an additional Service Auth Include Rule in our Zero Trust Dashboard, without it I get the error that I am not allowed to view that endpoint.

This seems absolutely ridicoulus, it really does...
Was this page helpful?