mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-13 22:36:27 +03:00
simplify getting the *caddy.Replacer
line
Co-authored-by: Francis Lavoie <lavofr@gmail.com>
This commit is contained in:
parent
f94affbc39
commit
998d165b45
1 changed files with 1 additions and 1 deletions
|
@ -158,7 +158,7 @@ func (ash *Handler) Provision(ctx caddy.Context) error {
|
|||
return fmt.Errorf("certificate lifetime (%s) should be less than intermediate certificate lifetime (%s)", time.Duration(ash.Lifetime), time.Duration(ca.IntermediateLifetime))
|
||||
}
|
||||
|
||||
repl, ok := ctx.Context.Value(caddy.ReplacerCtxKey).(*caddy.Replacer)
|
||||
repl, ok := ctx.Value(caddy.ReplacerCtxKey).(*caddy.Replacer)
|
||||
if !ok {
|
||||
repl = caddy.NewReplacer()
|
||||
ctx.Context = context.WithValue(ctx.Context, caddy.ReplacerCtxKey, repl)
|
||||
|
|
Loading…
Reference in a new issue