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"

6 Replies
Your config doesn't appear to be mitigating it, could be further down. I'd start with adding logs inside of your Pages Function, and then looking at those logs when you send a request
?pages-logs
If you're looking to tail a Pages Function you can do so in the UI here: https://dash.cloudflare.com?to=/:account/pages/view/:pages-project/:pages-deployment/functions
or with Wrangler:
wrangler pages deployment tail [deploymentId/url]
Hi @Leo , I work with Ross. thanks for helping us out
Here are the response headers
thank you, we'll look into that