This seems to work in Caddy, using a CEL expression:
@unrealistic-browsers <<CEL {header.User-Agent}.matches("(Chrome|Firefox|Safari)") && ! ({header.Sec-Fetch-Dest}.matches("^.+$") && {header.Sec-Fetch-Mode}.matches("^.+$") && {header.Sec-Fetch-Site}.matches("^.+$")) CEL handle @unrealistic-browsers { abort }
BTW if anyone has an invite on Lobsters I would appreciate it. :)
This seems to work in Caddy, using a CEL expression:
Maybe there is a better way. And maybe this stops working when all low-effort bots add these headers to their crawlers.BTW if anyone has an invite on Lobsters I would appreciate it. :)