JavaScript duplex filter - Redis

This filter is exactly like the JavaScript request filter and the JavaScript response filter, except that it can be invoked for both requests and responses. This can be desirable when the filter needs to see both the requests and the responses, for instance to do performance analysis.

Parameters

  • Command patterns : optional. If specified, a comma-separated (or line break separated) list of strings or regular expressions for which this filter should be called, for instance: SCAN,0,MATCH,*,COUNT,regex:\d+. Spaces are ignored. All specified patterns must match in the given order for the filter to execute.

  • Response patterns: optional. If specified, a comma-separated (or line break separated) list of strings or regular expressions that the response must match

  • Client IPs: optional. If specified, a comma-separated (or line break separated) list of IP4 or IP6 addresses or regular expressions for IP addresses.

  • Users: optional. If specified, a comma-separated (or line break separated) list of user names or regular expressions for user names.

Note that this is different than the JavaScript response filter, which allows you to specify command patterns that will be checked against the last request. Here, the command patterns will be checked against the requests as they are received.