mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
bad host handler: return a generic error message
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -1191,8 +1191,9 @@ func (s *httpdServer) badHostHandler(w http.ResponseWriter, r *http.Request) {
|
||||
break
|
||||
}
|
||||
}
|
||||
logger.Debug(logSender, "", "the host %q is not allowed", host)
|
||||
s.sendForbiddenResponse(w, r, util.NewI18nError(
|
||||
util.NewGenericError(fmt.Sprintf("The host %q is not allowed", host)),
|
||||
util.NewGenericError(http.StatusText(http.StatusForbidden)),
|
||||
util.I18nErrorConnectionForbidden,
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user