log mismatch domain and location string
This commit is contained in:
parent
65d8fe37c5
commit
9c12808edd
@ -108,8 +108,9 @@ func (rp *HttpReverseProxy) Register(routeCfg VhostRouteConfig) error {
|
|||||||
defer rp.cfgMu.Unlock()
|
defer rp.cfgMu.Unlock()
|
||||||
_, ok := rp.vhostRouter.Exist(routeCfg.Domain, routeCfg.Location)
|
_, ok := rp.vhostRouter.Exist(routeCfg.Domain, routeCfg.Location)
|
||||||
if ok {
|
if ok {
|
||||||
return ErrRouterConfigConflict
|
return errors.New(ErrRouterConfigConflict.Error() + ". domain = " + routeCfg.Domain + ", location = " + routeCfg.Location)
|
||||||
} else {
|
} else {
|
||||||
|
frpLog.Debug("Add domain = %s, location = %s", routeCfg.Domain, routeCfg.Location)
|
||||||
rp.vhostRouter.Add(routeCfg.Domain, routeCfg.Location, &routeCfg)
|
rp.vhostRouter.Add(routeCfg.Domain, routeCfg.Location, &routeCfg)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
@ -145,7 +146,7 @@ func (rp *HttpReverseProxy) CreateConnection(domain string, location string) (ne
|
|||||||
return fn()
|
return fn()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil, ErrNoDomain
|
return nil, errors.New(ErrNoDomain.Error() + ". domain = " + domain + ", location = " + location)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rp *HttpReverseProxy) CheckAuth(domain, location, user, passwd string) bool {
|
func (rp *HttpReverseProxy) CheckAuth(domain, location, user, passwd string) bool {
|
||||||
|
Loading…
Reference in New Issue
Block a user