File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ func (TLS) CaddyModule() caddy.ModuleInfo {
8787func (t * TLS ) Provision (ctx caddy.Context ) error {
8888 t .ctx = ctx
8989 t .logger = ctx .Logger (t )
90+ repl := caddy .NewReplacer ()
9091
9192 // set up a new certificate cache; this (re)loads all certificates
9293 cacheOpts := certmagic.CacheOptions {
@@ -176,6 +177,11 @@ func (t *TLS) Provision(ctx caddy.Context) error {
176177 onDemandRateLimiter .SetWindow (0 )
177178 }
178179
180+ // run replacer on ask URL (for environment variables)
181+ if t .Automation != nil && t .Automation .OnDemand != nil && t .Automation .OnDemand .Ask != "" {
182+ t .Automation .OnDemand .Ask = repl .ReplaceAll (t .Automation .OnDemand .Ask , "" )
183+ }
184+
179185 // load manual/static (unmanaged) certificates - we do this in
180186 // provision so that other apps (such as http) can know which
181187 // certificates have been manually loaded, and also so that
You can’t perform that action at this time.
0 commit comments