Pass Lua variable in proxy pass directive

Dalroti, Husain Husain.Dalroti at mastercard.com
Mon May 30 07:30:10 UTC 2022


Hi Team,

Is it possible to pass lua variable in proxy pass directive which we define using set_by_lua_file directive ?

Example :
set_by_lua_file $ref test.lua;
proxy_pass '$ref';

Below is lua code :

local function main()
    local host="https://example.com"
    return host
end

return main()

Thanks & Regards
Husain Dalroti
CONFIDENTIALITY NOTICE This e-mail message and any attachments are only for the use of the intended recipient and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient, any disclosure, distribution or other use of this e-mail message or attachments is prohibited. If you have received this e-mail message in error, please delete and notify the sender immediately. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20220530/73d2982a/attachment.htm>


More information about the nginx-devel mailing list