AstroDev
AstroDev
CDCloudflare Developers
Created by AstroDev on 6/12/2024 in #workers-help
How to call a Worker from another Worker (403)
Inside of a Worker - how do you call another Worker without Cloudflare challenging the request? E.g.
//Worker A
export default {
async fetch(request, env) {
//Worker B
await fetch('https://test.workers.dev');
//^ This throws 403 with a CF challenge
}
}
//Worker A
export default {
async fetch(request, env) {
//Worker B
await fetch('https://test.workers.dev');
//^ This throws 403 with a CF challenge
}
}
I've tried adding a bunch of headers into the Fetch - but still get the 403. Is there a way to tell Cloudflare to trust its own IPs?
6 replies