Welcome! Log In Create A New Profile

Advanced

Pass Lua variable in proxy pass directive

May 31, 2022 01:53AM
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()
Subject Author Posted

Pass Lua variable in proxy pass directive

husaindalroti May 31, 2022 01:53AM

Re: Pass Lua variable in proxy pass directive

Francis Daly May 31, 2022 02:48PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 142
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready