mirror of
https://github.com/drakkan/sftpgo.git
synced 2026-03-14 14:25:52 +01:00
bad host handler: return a generic error message
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
parent
fbf8b1285d
commit
1f4cb7077a
1 changed files with 2 additions and 1 deletions
|
|
@ -1188,8 +1188,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,
|
||||
))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue