Just eyeballing it, but probably because it is doing fairly fragile string matches into config to look for virtualhost configs to apply to the request. Likely done as the lua_state may be reused across virtualhosts, so different config from where it was created.

-Brian

On Tue, Jun 8, 2021 at 1:43 AM Nikita Popov <npopov@cloudlinux.com> wrote:
Hello. While investigating source codes I've found the following
comment for modules/lua/lua_request.c::lua_ap_get_active_config
function - "Hack, hack, hack...! TODO: Make this actually work
properly". Could anyone explain what needs to be fixed for this
function? I'm looking for a contributor's mission as suggested by the
STATUS file. Thanks in advance!