I know a Rack middleware filter is a Ruby class with an initialize and a call method. I know the call method takes an \"env\" argument. Something like this:
The env variable is a hash, which contains a lot of useful information including request headers and body, and run-time environment data that may have been added by upstream middleware.