mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-02 18:50:13 +00:00
Add fix bot blocker to beta-test-blocker-badwords
This commit is contained in:
parent
ce7c133e1d
commit
811382290c
1 changed files with 10 additions and 0 deletions
|
@ -83,6 +83,15 @@ printf "\n\n"
|
|||
sudo cp ${TRAVIS_BUILD_DIR}/.dev-tools/test_units/bad-referrer-words.conf /etc/nginx/bots.d/bad-referrer-words.conf
|
||||
}
|
||||
|
||||
fixbotblocker () {
|
||||
echo "${bold}${green}----------------------------------------"
|
||||
echo "${bold}${green}Replacing botblocker-nginx-settings.conf"
|
||||
echo "${bold}${green}----------------------------------------"
|
||||
printf "\n\n"
|
||||
sudo wget https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/conf.d/botblocker-nginx-settings.conf -O /etc/nginx/conf.d/botblocker-nginx-settings.conf
|
||||
}
|
||||
|
||||
|
||||
run_curltest1 () {
|
||||
if curl -I http://localhost:9000 -e "thisisabadword" 2>&1 | grep -i '(52)'; then
|
||||
echo "${bold}${green}PASSED - User bad-referrer-words.conf working"
|
||||
|
@ -111,6 +120,7 @@ echo "${bold}${green}--------------------------------"
|
|||
printf "\n\n"
|
||||
|
||||
activateBadWords
|
||||
fixbotblocker
|
||||
reloadNginX
|
||||
waitforReload
|
||||
run_curltest1
|
||||
|
|
Loading…
Add table
Reference in a new issue