From 094cb9e27f6bc6a180309bb695482741d6308017 Mon Sep 17 00:00:00 2001 From: Tracey Jaquith Date: Fri, 10 Jan 2025 23:34:10 -0800 Subject: [PATCH] simplify --- etc/Caddyfile.ctmpl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/etc/Caddyfile.ctmpl b/etc/Caddyfile.ctmpl index 7af8f3c..cc43583 100644 --- a/etc/Caddyfile.ctmpl +++ b/etc/Caddyfile.ctmpl @@ -109,8 +109,7 @@ http:// { } {{- if ne (env "ALLOWED_REMOTE_IPS_HTTP") "" }} - {{- if $tag | regexReplaceAll "^https://" "" | regexMatch ":" }} - {{- else }} + {{- if $tag | regexMatch "^https://[^:]+$" }} http://{{ $tag | regexReplaceAll "^https://" "" }} { @redir not remote_ip {{ env "ALLOWED_REMOTE_IPS_HTTP" }} redir @redir https://{host}{uri} permanent