changed ACCOUNTS_AUTH_REQUIRED to ACCOUNTS_LIMIT_ACCESS string var for more flexibility

This commit is contained in:
Karol Wypchlo 2022-01-12 14:05:25 +01:00
parent 15aea1da40
commit 4b74ced941
No known key found for this signature in database
GPG Key ID: B515DE9EEBE241E1
3 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@ services:
nginx: nginx:
environment: environment:
- ACCOUNTS_ENABLED=true - 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: depends_on:
- accounts - accounts

View File

@ -58,7 +58,7 @@ function _M.is_authenticated()
end end
function _M.is_auth_required() function _M.is_auth_required()
return os.getenv("ACCOUNTS_AUTH_REQUIRED") == "true" return os.getenv("ACCOUNTS_LIMIT_ACCESS") == "authenticated"
end end
-- check whether access to portal should be restricted -- check whether access to portal should be restricted

View File

@ -29,7 +29,7 @@ worker_processes auto;
env SKYNET_PORTAL_API; env SKYNET_PORTAL_API;
env SKYNET_SERVER_API; env SKYNET_SERVER_API;
env PORTAL_MODULES; env PORTAL_MODULES;
env ACCOUNTS_AUTH_REQUIRED; env ACCOUNTS_LIMIT_ACCESS;
events { events {
worker_connections 8192; worker_connections 8192;