title: envoy lua filter - authorization header to envoy_on_response() method
body: <p>I have a envoy lua filter to intercept upstream response and call a external api from the lua filter's &quot;envoy_on_response&quot; method. I need  request_handle's &quot;authorization&quot; value inside envoy_on_response()&quot; coroutine and pass it to external api call. I'm doing currently as below:</p>
  <pre><code> - name: envoy.filters.http.lua
        typed_config:
          &quot;@type&quot;: type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua
          inline_code: |
            local authToken = &quot;&quot;
            -- Called on the request path.
            function envoy_on_request(request_handle)
              authToken = request_handle:headers():get(&quot;authorization&quot;)
            end
            -- Called on the response path.
            function envoy_on_response(response_handle)
              -- Make an HTTP call to an upstream host with the following headers, body, and timeout.
                local headers, body = response_handle:httpCall(
                &quot;ext_authz-http-service&quot;,
                {
                  [&quot;:method&quot;] = &quot;GET&quot;,
                  [&quot;:path&quot;] = &quot;/v1/response-filter&quot;,
                  [&quot;:authority&quot;] = &quot;my-api-service&quot;,
                  [&quot;authorization&quot;] = authToken
                },
                &quot;test body data&quot;,
                5000)
            end
            
  </code></pre>
  <p>Some where in the envoy doc, it was mentioned both &quot;envoy_on_request()&quot; &amp;  &quot;envoy_on_response()&quot; are called as co-routines and nothing should be shared between them.
  So, my question is, what is the right way to get and pass &quot;authorization&quot; header inside &quot;envoy_on_response()&quot; ?.</p>
  <p>Thanks.</p>