geoip - fix bug when using GeoIP
This commit is contained in:
parent
c3a437fa82
commit
dd5890e760
@ -2,4 +2,4 @@ User-agent: *
|
|||||||
|
|
||||||
Disallow: /en/dev/
|
Disallow: /en/dev/
|
||||||
|
|
||||||
Sitemap: https://bunkerized-nginx.readthedocs.io/sitemap.xml
|
Sitemap: https://bunkerized-nginx.readthedocs.io/mysitemap.xml
|
||||||
|
|||||||
@ -69,7 +69,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
# GeoIP
|
# GeoIP
|
||||||
if [ "$(has_value BLACKLIST_COUNTRY .+)" != "" ] || [ "$(has_value WHITELIST_COUNTRY .+)" != "" ] ; then
|
if [ "$(has_value BLACKLIST_COUNTRY ".\+")" != "" ] || [ "$(has_value WHITELIST_COUNTRY ".\+")" != "" ] ; then
|
||||||
if [ -f "/cache/geoip.mmdb" ] ; then
|
if [ -f "/cache/geoip.mmdb" ] ; then
|
||||||
echo "[*] Copying cached geoip.mmdb ..."
|
echo "[*] Copying cached geoip.mmdb ..."
|
||||||
cp /cache/geoip.mmdb /etc/nginx/geoip.mmdb
|
cp /cache/geoip.mmdb /etc/nginx/geoip.mmdb
|
||||||
|
|||||||
@ -3,11 +3,11 @@
|
|||||||
# load some functions
|
# load some functions
|
||||||
. /opt/entrypoint/utils.sh
|
. /opt/entrypoint/utils.sh
|
||||||
|
|
||||||
if [ $(grep "^SWARM_MODE=yes$" /etc/nginx/global.env) != "" ] && [ -f /usr/sbin/nginx ] ; then
|
if [ "$(grep "^SWARM_MODE=yes$" /etc/nginx/global.env)" != "" ] && [ -f /usr/sbin/nginx ] ; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$(has_value BLACKLIST_COUNTRY .+)" = "" ] && [ "$(has_value WHITELIST_COUNTRY .+)" = "" ] ; then
|
if [ "$(has_value BLACKLIST_COUNTRY ".\+")" = "" ] && [ "$(has_value WHITELIST_COUNTRY ".\+")" = "" ] ; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user