mirror of
https://github.com/caddyserver/caddy.git
synced 2025-06-01 17:28:53 +08:00
cmd: Strict unmarshal for validate (#5383)
This commit is contained in:
@ -326,7 +326,7 @@ func (ctx Context) LoadModuleByID(id string, rawMsg json.RawMessage) (any, error
|
||||
|
||||
// fill in its config only if there is a config to fill in
|
||||
if len(rawMsg) > 0 {
|
||||
err := strictUnmarshalJSON(rawMsg, &val)
|
||||
err := StrictUnmarshalJSON(rawMsg, &val)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("decoding module config: %s: %v", modInfo, err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user