Pass Lua variable in proxy pass directive

Francis Daly francis at daoine.org
Tue May 31 18:46:30 UTC 2022


On Tue, May 31, 2022 at 01:53:20AM -0400, husaindalroti wrote:

Hi there,

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

Untested, but the documentation suggests that it should work.

> set_by_lua_file $ref test.lua; 
> proxy_pass '$ref';

Perhaps use:

    proxy_pass $ref;

without the quotes, to match most examples of using variables in
proxy_pass.

Good luck with it,

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list