Mount point for worker to prevent useless wasing of money (404)

For Workers & Pages, what is the name of the domain?

example.com

What is the issue or error you’re encountering

Bloated logs with 404

What steps have you taken to resolve the issue?

Hours spend on readig CFW docs and experiments

What are the steps to reproduce the issue?

conf:

run_worker_first = false
not_found_handling = "404-page"

$ curl <any-non-existing-assets-page>

Can’t edit templated post, posting here my story.
I was inspired to move from pages to workers + I found a feature I would implement as worker for my static hugo website.

With conf above (assets_navigation_prefers_asset_serving cap is default now), the request to non-existing asset is handled by 404.html, so far so good. I’m using custom domain routing mode.

But the confusing part is I couldn’t find any information in docs on how to call worker actually. In my understanding there should be a path to mount it, and by default this path is == /.

Why this is bad design: while I was sleeping my worker logs filled with 404 request made by malicous bots (probs), with requests like GET /.env end hundreds of others. These requests drops to worker as it acts a catch-all handler, which is really bad idea.

What should be done is ability to mount worker to specific path, this won’t help with curl xxx.com/mount-point but will eliminate useless worker load for 99.9% of probe’s requests.

I’m I missing something in docs? If not, consider this a feature request :slight_smile:
Should I post it to GH too?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.