mirror of
https://github.com/swissmakers/fail2ban-ui.git
synced 2026-04-11 13:47:05 +02:00
Fix filter debug pharsing, add normalizion and write temp-files to check with fail2ban-regex
This commit is contained in:
@@ -823,12 +823,12 @@ func TestFilterHandler(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
matches, err := conn.TestFilter(c.Request.Context(), req.FilterName, req.LogLines)
|
||||
output, err := conn.TestFilter(c.Request.Context(), req.FilterName, req.LogLines)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": "Failed to test filter: " + err.Error()})
|
||||
return
|
||||
}
|
||||
c.JSON(http.StatusOK, gin.H{"matches": matches})
|
||||
c.JSON(http.StatusOK, gin.H{"output": output})
|
||||
}
|
||||
|
||||
// ApplyFail2banSettings updates /etc/fail2ban/jail.local [DEFAULT] with our JSON
|
||||
|
||||
Reference in New Issue
Block a user