Browse Source

A few miscellaneous, minor fixes

master
Matthew Holt 5 years ago
parent
commit
5c99267dd8
No known key found for this signature in database GPG Key ID: 2A349DD577D586A5
  1. 3
      modules/caddyhttp/headers/caddyfile.go
  2. 2
      modules/caddytls/acmemanager.go
  3. 8
      modules/caddytls/tls.go

3
modules/caddyhttp/headers/caddyfile.go

@ -105,6 +105,9 @@ func parseReqHdrCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler,
} }
if h.NextArg() { if h.NextArg() {
replacement = h.Val() replacement = h.Val()
if h.NextArg() {
return nil, h.ArgErr()
}
} }
if hdr.Request == nil { if hdr.Request == nil {

2
modules/caddytls/acmemanager.go

@ -78,7 +78,7 @@ type ACMEManagerMaker struct {
// Optionally configure a separate storage module associated with this // Optionally configure a separate storage module associated with this
// manager, instead of using Caddy's global/default-configured storage. // manager, instead of using Caddy's global/default-configured storage.
Storage json.RawMessage `json:"storage,omitempty"` Storage json.RawMessage `json:"storage,omitempty" caddy:"namespace=caddy.storage inline_key=module"`
// An array of files of CA certificates to accept when connecting to the // An array of files of CA certificates to accept when connecting to the
// ACME CA. Generally, you should only use this if the ACME CA endpoint // ACME CA. Generally, you should only use this if the ACME CA endpoint

8
modules/caddytls/tls.go

@ -107,10 +107,10 @@ func (t *TLS) Provision(ctx caddy.Context) error {
// special case; these will be loaded in later // special case; these will be loaded in later
// using our automation facilities, which we // using our automation facilities, which we
// want to avoid during provisioning // want to avoid during provisioning
var ok bool if automateNames, ok := modIface.(*AutomateLoader); ok && automateNames != nil {
t.automateNames, ok = modIface.([]string) t.automateNames = []string(*automateNames)
if !ok { } else {
return fmt.Errorf("loading certificates with 'automate' requires []string, got: %#v", modIface) return fmt.Errorf("loading certificates with 'automate' requires array of strings, got: %T", modIface)
} }
continue continue
} }

Loading…
Cancel
Save