mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-02 10:40:36 +00:00
Referrer Whitelisting Test
This commit is contained in:
parent
267bed9aff
commit
8deb982b7a
1 changed files with 3 additions and 3 deletions
|
@ -52,11 +52,11 @@ run_curltest1
|
|||
run_curltest2 () {
|
||||
printf '\n%s\n%s\n%s\n\n' "##############################" "TESTING BAD REFERRER IS DENIED" "##############################"
|
||||
if curl -I http://localhost:9000/index.html -e http://zx6.ru 2>&1 | grep -i 'Welcome'; then
|
||||
echo "$(tput setaf 2)WHITELISTING OF BAD BOT ALLOWED - TEST PASSED"
|
||||
echo "$(tput setaf 2)WHITELISTING OF REFERRER ALLOWED - TEST PASSED"
|
||||
else
|
||||
echo "$(tput setaf 1)WHITELISTING FAILED - TEST FAILED"
|
||||
echo "$(tput setaf 1)WHITELISTING REFERRER FAILED - TEST FAILED"
|
||||
#exit 1
|
||||
curl -v -A "Nutch" http://localhost:9000 2>&1
|
||||
curl -I http://localhost:9000/index.html -e http://zx6.ru 2>&1
|
||||
fi
|
||||
}
|
||||
run_curltest2
|
||||
|
|
Loading…
Add table
Reference in a new issue