spdermn
spdermn
CDCloudflare Developers
Created by spdermn on 11/1/2024 in #general-help
Possible race condition when using polish and image resizing?
I initially started out using Polish and later implemented the /cdn-cgi/image images API. I noticed some images failing to resize and instead falling back to origin (onerror=redirect) with Cf-Not-Resized: 9524.
I noticed the redirected images would deliver with Cf-Polish headers. I've since turned off polish and purged cache and image transformations started working again. Purging didn't help before.
6 replies
CDCloudflare Developers
Created by spdermn on 8/14/2024 in #workers-help
Fetch origin using worker endless loop
I'm trying to do something using a worker on a route before passing the request on (to cache, origin, etc.). I think I should be able to just call fetch() on the original request, but that puts me in an endless loop of the worker calling itself.
Can someone hit me on the head real quick? :NotLikeThis:
export default {
async fetch(request, env, ctx) {
// Do something else
// ..

// Fetch origin
return await this.fetch(request)
},
};
export default {
async fetch(request, env, ctx) {
// Do something else
// ..

// Fetch origin
return await this.fetch(request)
},
};
17 replies