warn at start if body reading is disabled
This commit is contained in:
parent
6cbeefead6
commit
f18b554177
1 changed files with 10 additions and 0 deletions
|
@ -51,6 +51,11 @@ func (r *WaapRunner) Init(datadir string) error {
|
|||
return fmt.Errorf("unable to initialize inband engine : %w", err)
|
||||
}
|
||||
|
||||
tx := r.WaapInbandEngine.NewTransaction()
|
||||
if !tx.IsRequestBodyAccessible() {
|
||||
runnerLogger.Warningf("request body is not accessible, inband rules won't be able to match on it")
|
||||
}
|
||||
|
||||
r.WaapOutbandEngine, err = coraza.NewWAF(
|
||||
coraza.NewWAFConfig().WithDirectives(outOfBandRules).WithRootFS(fs).WithDebugLogger(NewCrzLogger(runnerLogger)),
|
||||
)
|
||||
|
@ -59,6 +64,11 @@ func (r *WaapRunner) Init(datadir string) error {
|
|||
return fmt.Errorf("unable to initialize outband engine : %w", err)
|
||||
}
|
||||
|
||||
tx = r.WaapOutbandEngine.NewTransaction()
|
||||
if !tx.IsRequestBodyAccessible() {
|
||||
runnerLogger.Warningf("request body is not accessible, outband rules won't be able to match on it")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue