fix remove fail2ban
This commit is contained in:
parent
02c7c97f68
commit
bd95dd8ffd
|
@ -15,7 +15,7 @@
|
|||
<h2>Change Password</h2>
|
||||
<form action="/changePassword" method="post">
|
||||
<div class="form-field">
|
||||
<label for="user">User: (without domain)</label>
|
||||
<label for="user">User:</label>
|
||||
<input type="text" id="user" name="user" required>
|
||||
</div>
|
||||
<div class="form-field">
|
||||
|
|
|
@ -33,9 +33,9 @@ func (handler ProsodyHandler) Post(c *fiber.Ctx) error {
|
|||
User: c.FormValue("user", ""),
|
||||
}
|
||||
if err := handler.prosodyService.ChangePassword(req.User, req.CurrentPassword, req.NewPassword); err != nil {
|
||||
for _, ip := range c.IPs() {
|
||||
handler.fail2banSrv.FailedAttempt(ip)
|
||||
}
|
||||
// for _, ip := range c.IPs() {
|
||||
// handler.fail2banSrv.FailedAttempt(ip)
|
||||
// }
|
||||
return RenderError(c, fmt.Errorf("ChangePassword: %w", err), defaultErrMessage)
|
||||
}
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@ func (s *RestServer) Start(apiPort, views string) error {
|
|||
})
|
||||
|
||||
s.app.Use(limiter.New(limiter.Config{
|
||||
Max: 5,
|
||||
Expiration: 1 * time.Hour,
|
||||
Max: 8,
|
||||
Expiration: 30 * time.Minute,
|
||||
LimiterMiddleware: limiter.SlidingWindow{},
|
||||
}))
|
||||
|
||||
|
|
Loading…
Reference in New Issue