Welcome! Log In Create A New Profile


Pass Lua variable in proxy pass directive

May 30, 2022 03:32AM
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

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.
nginx-devel mailing list -- nginx-devel@nginx.org
To unsubscribe send an email to nginx-devel-leave@nginx.org
Subject Author Views Posted

Pass Lua variable in proxy pass directive

husaindalroti 125 May 30, 2022 03:32AM

Re: Pass Lua variable in proxy pass directive

Sergey A. Osokin 56 May 30, 2022 10:52AM

Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 62
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready