diff --git a/hush-lite-server.md b/hush-lite-server.md index d1e08ea..e802ba5 100644 --- a/hush-lite-server.md +++ b/hush-lite-server.md @@ -86,6 +86,26 @@ Install your preferred distro. In this example I am using a VPS running Ubuntu 2 # Replace your_host.net:9067 with the address and port of your gRPC server if using a custom port grpc_pass grpc://your_host.net:9067; } + + # Originally posted by Duke in /hush/hush3/issues/102#issuecomment-1651 + + # Get the fuck off my lawn motherfuckerz + + if ($request_method !~ ^(GET|HEAD|POST)$ ) { return 444; } + + # fuck these bots + if ($http_user_agent ~* "Googlebot|YandexBot|bingbot|applebot|Mojeekbot|ICC-Crawler|SemrushBot|xforce-security.com|TestBot|MauiBot|CCBot|SummalyBot|PetalBot|BLEXBot|expanseinc.com|clark-crawler|AhrefsBot|mj12bot|YisouSpider|opensiteexplorer|seznambot|dataforseo|Adsbot|Neevabot") { + return 444; + } + + location ~* .(display_errors|set_time_limit|allow_url_include.*disable_functions.*open_basedir|set_magic_quotes_runtime|webconfig.txt.php|file_put_contentssever_root|wlwmanifest) { + return 444; + } + + location ~* ^/wp-content/.*$ { + return 444; + } + } ```