mbackonja
04/25/2023, 2:42 PMhttps://xxxxxxx.s3.eu-central-1.amazonaws.com/error.html
And my worker is like this
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
return await fetch('https://xxxxxxx.s3.eu-central-1.amazonaws.com/error.html')
}
And once I attach Cloudflare Worker to some routes, those routes returns
403 Forbidden
cloudflare
but if I open that worked directly through xxxxx.workers.dev
domain it's working as expected (HTML from S3 bucket is returned)...Hello guys, I have issues with the simple Cloudflare worker that acts like a proxy to a single file on a public S3. That worker was working a few months ago and now I need it again, but it doesn't work now...
AWS S3 bucket is public, the file is also public, I can access that HTML file directly through the browser (masked bucket name): https://xxxxxxx.s3.eu-central-1.amazonaws.com/error.html
And my worker is like this
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
return await fetch('https://xxxxxxx.s3.eu-central-1.amazonaws.com/error.html')
}
And once I attach Cloudflare Worker to some routes, those routes returns
403 Forbidden
cloudflare
but if I open that worked directly through xxxxx.workers.dev
domain it's working as expected (HTML from S3 bucket is returned)...
Attached pics:
First pic - workers.dev - working
Second pic - real domain - not working
Third pic - source code of the worker