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
Should I post it to GH too?