Provision implements caddy.Provisioner.
(ctx caddy.Context)
| 32 | |
| 33 | // Provision implements caddy.Provisioner. |
| 34 | func (fl FileLoader) Provision(ctx caddy.Context) error { |
| 35 | repl, ok := ctx.Value(caddy.ReplacerCtxKey).(*caddy.Replacer) |
| 36 | if !ok { |
| 37 | repl = caddy.NewReplacer() |
| 38 | } |
| 39 | for k, pair := range fl { |
| 40 | for i, tag := range pair.Tags { |
| 41 | pair.Tags[i] = repl.ReplaceKnown(tag, "") |
| 42 | } |
| 43 | fl[k] = CertKeyFilePair{ |
| 44 | Certificate: repl.ReplaceKnown(pair.Certificate, ""), |
| 45 | Key: repl.ReplaceKnown(pair.Key, ""), |
| 46 | Format: repl.ReplaceKnown(pair.Format, ""), |
| 47 | Tags: pair.Tags, |
| 48 | } |
| 49 | } |
| 50 | return nil |
| 51 | } |
| 52 | |
| 53 | // CaddyModule returns the Caddy module information. |
| 54 | func (FileLoader) CaddyModule() caddy.ModuleInfo { |
nothing calls this directly
no test coverage detected