From e313571179edb98831d7cc7c6299470c32094ed3 Mon Sep 17 00:00:00 2001 From: mhmdksh Date: Tue, 13 Aug 2024 17:28:15 +0300 Subject: [PATCH] fixed caddy variables --- .caddy.env.template => .env.template | 0 Caddyfile | 9 ++++++++- docker-compose-staging.yml | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) rename .caddy.env.template => .env.template (100%) diff --git a/.caddy.env.template b/.env.template similarity index 100% rename from .caddy.env.template rename to .env.template diff --git a/Caddyfile b/Caddyfile index f95834d22..9bffcc5cd 100644 --- a/Caddyfile +++ b/Caddyfile @@ -1,3 +1,10 @@ {$MY_URL} { - reverse_proxy @allowed qacc-be:4000 + route { + @allowed { + path /* + remote_ip {$IP_WHITELIST} + } + reverse_proxy @allowed qacc-be:4000 + respond 403 + } } \ No newline at end of file diff --git a/docker-compose-staging.yml b/docker-compose-staging.yml index d16aefd06..a1b1cc5ce 100644 --- a/docker-compose-staging.yml +++ b/docker-compose-staging.yml @@ -40,7 +40,7 @@ services: - 80:80 - 443:443 env_file: - - .caddy.env + - .env environment: - MY_URL=${MY_URL:-} - IP_WHITELIST=${IP_WHITELIST:-}