envoy: Disabling LuaPerRoute configuration doesn't work with envoy-v1.19.0
Title: Disabling LuaPerRoute configuration doesn’t work with envoy-v1.19.0
Description: Lua filter is executed for requests which match a route with Lua disabled using LuaPerRoute configuration. We are seeing this only in the latest envoy version - v1.19.0.
Repro steps:
- Using the example from envoy doc, add a lua filter before the
envoy.filters.http.router
filter.
- name: envoy.filters.http.lua
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua
inline_code: |
function envoy_on_request(request_handle)
request_handle:logInfo("Hello World.")
end
function envoy_on_response(response_handle)
response_handle:logInfo("Goodbye")
end
- Create the following route in
envoy.filters.network.http_connection_manager
with lua filter disabled.
- match:
prefix: "/healthcheck"
direct_response:
status: 200
typed_per_filter_config:
envoy.filters.http.lua:
"@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.LuaPerRoute
disabled: true
- Start Envoy
docker run -it -v $(pwd):/etc -p 10000:10000 -e ENVOY_UID=0 envoyproxy/envoy:v1.19.0 -c /etc/static.yaml
- Make a request to
/healthcheck
.
curl -v localhost:10000/healthcheck
< HTTP/1.1 200 OK
< date: Thu, 15 Jul 2021 14:35:12 GMT
< server: envoy
< content-length: 0
Expectation: Lua filter should not be executed
Actual logs:
[2021-07-15 14:30:45.627][23][debug][http] [source/common/http/conn_manager_impl.cc:858] [C0][S7712392761175078799] request headers complete (end_stream=true):
':authority', 'localhost:10000'
':path', '/healthcheck'
':method', 'GET'
'user-agent', 'curl/7.64.1'
'accept', '*/*'
[2021-07-15 14:30:45.627][23][info][lua] [source/extensions/filters/http/lua/lua_filter.cc:795] script log: Hello World.
[2021-07-15 14:30:45.628][23][debug][http] [source/common/http/filter_manager.cc:909] [C0][S7712392761175078799] Sending local reply with details direct_response
[2021-07-15 14:30:45.628][23][info][lua] [source/extensions/filters/http/lua/lua_filter.cc:795] script log: Goodbye
Config: static.yaml
Logs: trace logs
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (15 by maintainers)
/assign