From a2b157c6072c8febcb8c349f60806aefeedf85a1 Mon Sep 17 00:00:00 2001 From: jtbruins12 Date: Sun, 16 Apr 2023 16:15:58 -0400 Subject: [PATCH] Edit to the Caddyfile example. This is a better option for users that may be using a wildcard cert and multiple matchers for each service/host they run. --- Proxy-examples.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Proxy-examples.md b/Proxy-examples.md index f1e72c2..6736cff 100644 --- a/Proxy-examples.md +++ b/Proxy-examples.md @@ -17,6 +17,16 @@ In the Caddyfile syntax, `{$VAR}` denotes the value of the environment variable If you prefer, you can also directly specify a value instead of substituting an env var value. ``` + +# Uncomment this in addition with the import admin_redir statement allow access to the admin interface only from local networks +# (admin_redir) { +# @admin { +# path /admin* +# not remote_ip private_ranges +# } +# redir @admin / +# } + {$DOMAIN} { log { level INFO @@ -54,11 +64,7 @@ If you prefer, you can also directly specify a value instead of substituting an # } # Uncomment to allow access to the admin interface only from local networks - # @insecureadmin { - # not remote_ip 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8 - # path /admin* - # } - # redir @insecureadmin / +# import admin_redir # Notifications redirected to the websockets server reverse_proxy /notifications/hub :3012