mirror of
https://github.com/caddyserver/caddy.git
synced 2025-06-04 03:00:47 +08:00
cmd: Strict unmarshal for validate (#5383)
This commit is contained in:
2
caddy.go
2
caddy.go
@ -314,7 +314,7 @@ func unsyncedDecodeAndRun(cfgJSON []byte, allowPersist bool) error {
|
||||
strippedCfgJSON := RemoveMetaFields(cfgJSON)
|
||||
|
||||
var newCfg *Config
|
||||
err := strictUnmarshalJSON(strippedCfgJSON, &newCfg)
|
||||
err := StrictUnmarshalJSON(strippedCfgJSON, &newCfg)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user