firewall: error back for streaming rpcs

This commit is contained in:
bitromortac 2024-05-31 15:01:40 +02:00
parent 8f2ab273bb
commit 962d6667a8
No known key found for this signature in database
GPG key ID: 1965063FC13BEBE2

View file

@ -149,6 +149,12 @@ func (r *RuleEnforcer) Intercept(ctx context.Context,
// Parse incoming requests and act on them.
case MWRequestTypeRequest:
// Support for streaming requests is not yet implemented.
if ri.Streaming {
return mid.RPCErrString(req, "streaming requests not "+
"supported")
}
replacement, err := r.handleRequest(ctx, ri)
if err != nil {
dbErr := r.markActionErrored(ri.RequestID, err.Error())