From a891eb404b0fd4f391d958430e9a682850ae0ee8 Mon Sep 17 00:00:00 2001 From: Simon L Date: Wed, 4 Oct 2023 15:16:47 +0200 Subject: [PATCH] countries needs to be overwritten as well Signed-off-by: Simon L --- Caddyfile | 2 +- start.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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