This commit is contained in:
Sebastien Blot 2023-11-29 16:52:24 +01:00
parent b31d48a797
commit fe005f87e5
No known key found for this signature in database
GPG key ID: DFC2902F40449F6A

View file

@ -441,13 +441,11 @@ func (w *WaapRuntimeConfig) SetAction(params ...any) (any, error) {
//@tko how should we handle this ? it seems bouncer only understand bans, but it might be misleading ?
case "deny", "ban", "block":
w.Response.Action = "ban"
w.Response.HTTPResponseCode = w.Config.BlockedHTTPCode
case "log":
w.Response.Action = action
w.Response.HTTPResponseCode = w.Config.PassedHTTPCode
case "captcha":
w.Response.Action = action
w.Response.HTTPResponseCode = w.Config.BlockedHTTPCode
default:
return nil, fmt.Errorf("unknown action %s", action)
}