set $ip '';
set_by_lua $ip 'return os.getenv("DATA_DIRECTORY")';
On Friday, June 19, 2015 at 5:14:31 PM UTC-4, Rollin Crittendon wrote:
I have an application that uses an environment variable.
In the application's nginx.conf it looks something like this.
====
env DATA_DIRECTORY;
====
For testing I am using Test::Nginx::Socket::Lua.
In a t-file for testing how do I get that same sort of value set?
Right now I have a hack where I pass the string in to a module with a setting.
I would like to have the module code function as before, where it read the value as-follows.
====
os.getenv("DATA_DIRECTORY")
====
Any info is much appreciated.