title: Envoy ext_authz filter before lua
body: <p>I'm trying to add ext_authz filter to our filter chain. Problem is that we already have LUA filter that adds some HTTP headers and our routes are based on cluster_header. As I understand they both don't work together. If I change routes' cluster_header to exact cluster - ext_auth is called, otherwise LUA filter works. Is there any way to make them work together, except of calling auth service inside LUA?</p>
  
  <p>Config looks like:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>filter_chains:
    - filters:
        - name: envoy.http_connection_manager
          typed_config:
            "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
          stat_prefix: ingress_http
          route_config:
            name: local_route
            virtual_hosts:
              - name: main
                domains: ["*"]
                routes:
                  - match:
                      prefix: "/"
                    route:
                      cluster_header: cluster
                      hash_policy:
                        header:
                          header_name: balancing-key
                    metadata:
                      filter_metadata:
                        envoy.lua:
                          default_cluster: some-cluster                
           http_filters:
             - name: envoy.ext_authz
               typed_config:
                 "@type": type.googleapis.com/envoy.config.filter.http.ext_authz.v2.ExtAuthz
                 grpc_service:
                   envoy_grpc:
                     cluster_name: ext-authz
             - name: envoy.lua
               typed_config:
                 "@type": type.googleapis.com/envoy.config.filter.http.lua.v2.Lua
                 inline_code: some-code</code></pre>
  </div>
  </div>
  </p>