use set_by_lua instead
This commit is contained in:
parent
e463199022
commit
db1a50a999
|
@ -67,9 +67,9 @@ http {
|
|||
#gzip on;
|
||||
|
||||
# expose env variables as regular variables (env variables are not easily accessible in nginx)
|
||||
perl_set $SKYNET_PORTAL_API 'sub { return $ENV{"SKYNET_PORTAL_API"}; }';
|
||||
perl_set $SKYNET_SERVER_API 'sub { return $ENV{"SKYNET_SERVER_API"}; }';
|
||||
perl_set $ACCOUNTS_ENABLED 'sub { return $ENV{"ACCOUNTS_ENABLED"}; }';
|
||||
set_by_lua $SKYNET_PORTAL_API 'return os.getenv("SKYNET_PORTAL_API")';
|
||||
set_by_lua $SKYNET_SERVER_API 'return os.getenv("SKYNET_SERVER_API")';
|
||||
set_by_lua $ACCOUNTS_ENABLED 'return os.getenv("ACCOUNTS_ENABLED")';
|
||||
|
||||
# include skynet-portal-api header on every request
|
||||
header_filter_by_lua 'ngx.header["Skynet-Portal-Api"] = os.getenv("SKYNET_PORTAL_API")';
|
||||
|
|
Reference in New Issue