Why is my request blocked with a 403?

I have an application hosted on Cloudflare Pages with a custom domain. I also have a _worker.js that proxies requests to /api to an external server of ours. We need to make a request to /api at build time in GitHub Actions. When it tries to make this request it gets a 403 response from Cloudflare. The origin server does not receive this request at all, so something is blocking it. (The request works fine when I use curl).

I tried to add a WAF exception for this particular endpoint, and the logs say that the request was not blocked, but I'm still getting a 403. Does Cloudflare Pages workers have other rules that might be blocking the request? How can I change those.

The response on the client is an HTML page starting with

<!DOCTYPE html><html lang="en-US"><head><title>Just a moment...</title><meta http-equiv="Content-Type"
Untitled.png
Was this page helpful?