

6·
1 year agoI found that the Caddy handler above blocked many third party clients and even Tesseract.
So instead I’m using this CEL expression to return a 444 error on match of the unscoped old-sorted 50 per-page comments past page 99:
@block_comment_spam expression <<CEL
{http.request.uri.path} == "/api/v3/comment/list" &&
{http.request.uri.query.limit} == "50" &&
{http.request.uri.query.sort} == "Old" &&
int({http.request.uri.query.page}) > 99 &&
{http.request.uri.query.post_id} == ""
CEL
handle @block_comment_spam {
respond 444
}

Remember to thank all the community moderators and admins that tirelessly take the spammy, horrible and bot posts out to the trash for us, so we can have this nice space without being overrun by the trash!