diff --git a/Caddyfile b/Caddyfile index 23f8c1e..fad5f13 100644 --- a/Caddyfile +++ b/Caddyfile @@ -14,7 +14,7 @@ @geofilter { not maxmind_geolocation { db_path "/data/GeoLite2-Country.mmdb" - allow_countries $ALLOW_CONTRIES + allow_countries } not remote_ip private_ranges } diff --git a/start.sh b/start.sh index 839feed..2991fbb 100644 --- a/start.sh +++ b/start.sh @@ -43,7 +43,7 @@ CADDY fi if [ "$FILTER_SET" = 1 ] && [ "$FILE_THERE" = 1 ]; then - CADDYFILE="$(sed "s|# import GEOFILTER| import GEOFILTER|" /Caddyfile)" + CADDYFILE="$(sed "s|allow_countries.*|allow_countries $ALLOW_CONTRIES|;s|# import GEOFILTER| import GEOFILTER|" /Caddyfile)" else CADDYFILE="$(sed "s| import GEOFILTER|# import GEOFILTER|" /Caddyfile)" fi