mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-03 11:10:47 +00:00
Run Whitelisting Test
This commit is contained in:
parent
4b6b42f2f8
commit
a1d44b9a47
1 changed files with 13 additions and 0 deletions
|
@ -40,6 +40,19 @@ fi
|
|||
}
|
||||
run_curltest1
|
||||
|
||||
run_curltest2 () {
|
||||
printf '\n%s\n%s\n%s\n\n' "#########################" "TESTING USER WHITELIST" "#########################"
|
||||
if curl -v -A "Nutch" http://localhost:9000 2>&1 | grep -i 'Welcome'; then
|
||||
echo "$(tput setaf 2)WHITELISTING OF BAD BOT ALLOWED - TEST PASSED"
|
||||
else
|
||||
echo "$(tput setaf 1)WHITELISTING FAILED - TEST FAILED"
|
||||
#exit 1
|
||||
curl -v -A "Nutch" http://localhost:9000/index.php 2>&1
|
||||
fi
|
||||
}
|
||||
run_curltest2
|
||||
|
||||
|
||||
sudo cat /etc/nginx/bots.d/blacklist-user-agents.conf
|
||||
|
||||
echo "Whitelist Tests Completed"
|
||||
|
|
Loading…
Add table
Reference in a new issue