DetailedErrorsToClient - only send detailed error info if this is on

This commit is contained in:
Guy Lewin
2020-02-10 19:29:57 +02:00
parent c8748a2948
commit f8c6795119
3 changed files with 53 additions and 31 deletions

View File

@ -438,7 +438,11 @@ func (ctl *Control) manager() {
ProxyName: m.ProxyName,
}
if err != nil {
resp.Error = err.Error()
if ctl.serverCfg.DetailedErrorsToClient {
resp.Error = err.Error()
} else {
resp.Error = fmt.Sprintf("new proxy [%s] error", m.ProxyName)
}
xl.Warn("new proxy [%s] error: %v", m.ProxyName, err)
} else {
resp.RemoteAddr = remoteAddr