mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-02 10:40:36 +00:00
improve regex for root directive check
* to fix https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/138
This commit is contained in:
parent
59eb8358d1
commit
4b50bf09ef
1 changed files with 1 additions and 1 deletions
|
@ -401,7 +401,7 @@ main() {
|
|||
# do not use wildcards in vhost files
|
||||
printf "%-10s %-${col_size}s %s\n" "WARN:" "$BOTS_DIR/* detected" "=> $file"
|
||||
else # do not add includes to vhosts without root directive (i.e redirects)
|
||||
if grep -Ew [[:space:]]+root $file 1>/dev/null; then
|
||||
if grep -Ew ^[[:space:]]+root $file 1>/dev/null; then
|
||||
add_includes $line $file $BOTS_DIR $col_size $VHOST_INCLUDES
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue