mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-22 09:30:11 +01:00
Fixed nil dereferencing and added missing fields validation
This commit is contained in:
@@ -44,7 +44,10 @@ func (rp *ReverseProxyEntry) UseIdleWatcher() bool {
|
||||
}
|
||||
|
||||
func ValidateEntry(m *M.RawEntry) (any, E.NestedError) {
|
||||
m.SetDefaults()
|
||||
if !m.FillMissingFields() {
|
||||
return nil, E.Missing("fields")
|
||||
}
|
||||
|
||||
scheme, err := T.NewScheme(m.Scheme)
|
||||
if err.HasError() {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user