Thursday, August 6, 2020

Nginx Block User Agent Configuration


Try adding something like the following directives to your config to block user agent:

# Disallow User Agent
if ($http_user_agent ~* "agent1|Cheesebot|Catall Spider|LWP::Simple|BBBike|wget|libwww-perl|python|nikto|curl|scan|java|winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner" ) {
	return 404;
}



Previous Post
Next Post

0 komentar: