What is the “env” variable in Rack middleware?

前端 未结 4 842
心在旅途
心在旅途 2021-01-01 11:56

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:



        
4条回答
  •  南方客
    南方客 (楼主)
    2021-01-01 12:33

    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.

提交回复
热议问题