Also update for fail regexes

Update for fail regexes too (same issue as IPList)
This commit is contained in:
Phillip Moore 2014-07-03 10:58:18 -05:00 committed by Sean DuBois
parent 13babc7958
commit dec5d521b7
1 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,10 @@ func jailGetHandler(res http.ResponseWriter, req *http.Request, fail2goConn *fai
if IPList == nil {
IPList = []string{}
}
//If failRegexes is nil/null/doesn't exist, then initialize it to an empty string array. This resolves the front end issue where a null value is trying to be parsed for the list of regular expressions.
if(failRegexes == nil {
failRegexes = []string{}
}
encodedOutput, err := json.Marshal(map[string]interface{}{
"currentlyFailed": currentlyFailed,