Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support registering custom variable #5941

Merged
merged 3 commits into from
Dec 29, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
doc the source
Signed-off-by: spacewander <[email protected]>
spacewander committed Dec 29, 2021
commit 97e12adac39366e83c6286d5b3059218b07f0efb
1 change: 1 addition & 0 deletions apisix/core/ctx.lua
Original file line number Diff line number Diff line change
@@ -221,6 +221,7 @@ do
if getter == true then
val = ngx.ctx.api_ctx and ngx.ctx.api_ctx[key]
else
-- the getter is registered by ctx.register_var
val = getter(ngx.ctx.api_ctx)
end