From 4b74ced9418498699cfd5d432e91fe3d8d4de5a9 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Wed, 12 Jan 2022 14:05:25 +0100 Subject: [PATCH] changed ACCOUNTS_AUTH_REQUIRED to ACCOUNTS_LIMIT_ACCESS string var for more flexibility --- docker-compose.accounts.yml | 2 +- docker/nginx/libs/skynet/account.lua | 2 +- docker/nginx/nginx.conf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.accounts.yml b/docker-compose.accounts.yml index a47b2959..3ebad669 100644 --- a/docker-compose.accounts.yml +++ b/docker-compose.accounts.yml @@ -10,7 +10,7 @@ services: nginx: environment: - ACCOUNTS_ENABLED=true - - ACCOUNTS_AUTH_REQUIRED=${ACCOUNTS_AUTH_REQUIRED:-true} # default to authenticated access only + - ACCOUNTS_LIMIT_ACCESS=${ACCOUNTS_LIMIT_ACCESS:-authenticated} # default to authenticated access only depends_on: - accounts diff --git a/docker/nginx/libs/skynet/account.lua b/docker/nginx/libs/skynet/account.lua index c79763bd..1c495ae4 100644 --- a/docker/nginx/libs/skynet/account.lua +++ b/docker/nginx/libs/skynet/account.lua @@ -58,7 +58,7 @@ function _M.is_authenticated() end function _M.is_auth_required() - return os.getenv("ACCOUNTS_AUTH_REQUIRED") == "true" + return os.getenv("ACCOUNTS_LIMIT_ACCESS") == "authenticated" end -- check whether access to portal should be restricted diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf index ee61bbe8..3ae106c8 100644 --- a/docker/nginx/nginx.conf +++ b/docker/nginx/nginx.conf @@ -29,7 +29,7 @@ worker_processes auto; env SKYNET_PORTAL_API; env SKYNET_SERVER_API; env PORTAL_MODULES; -env ACCOUNTS_AUTH_REQUIRED; +env ACCOUNTS_LIMIT_ACCESS; events { worker_connections 8192;