Lua Phase Timing and Variable Scope Cause Incorrect Routing

7/10 High

Variables set in one Lua phase may not be available or may be stale in later phases if timing and scope are misunderstood. Logic relying on variables set in different phases (e.g., `set_by_lua*` vs. `access_by_lua*`) results in NGINX variables being empty or holding stale values, causing incorrect routing, logging, or access decisions.

Category
dx
Workaround
partial
Stage
debug
Freshness
persistent
Scope
framework
Upstream
open
Recurring
Yes
Maintainer
active

Sources

Collection History

Query: “What are the most common pain points with Nginx for developers in 2025?4/4/2026

Variables set in one phase may not be available or may be stale in later phases if the timing and scope are misunderstood...Logic that relies on a variable being set in a different phase (e.g., set_by_lua* vs. access_by_lua*) can result in NGINX variables ($var) being empty or holding stale values, causing incorrect routing, logging, or access decisions.

Created: 4/4/2026Updated: 4/4/2026