Pass Lua variable in proxy pass directive

Sergey A. Osokin osa at freebsd.org.ru
Mon May 30 14:49:47 UTC 2022


Hi Husain,

On Mon, May 30, 2022 at 07:30:10AM +0000, Dalroti, Husain wrote:
> 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()

The nginx-devel@ mailing list is to discuss nginx development.  If
don't want to suggest a patch, but rather need help with
understanding what goes wrong in your nginx configuration and how
to configure nginx properly, please use the nginx@ mailing list
instead.

Also, the question is related to the third-party module,
developing by another team.  So, I'd recommend to address the
question to the corresponding mailing list.

Thank you.

-- 
Sergey A. Osokin



More information about the nginx-devel mailing list