diff --git a/docker/nginx/libs/skynet/account.lua b/docker/nginx/libs/skynet/account.lua index 48490dc2..692d77d5 100644 --- a/docker/nginx/libs/skynet/account.lua +++ b/docker/nginx/libs/skynet/account.lua @@ -1,16 +1,30 @@ local _M = {} --- fallback - remember to keep those updated -local anon_limits = { ["tierID"] = 0, ["tierName"] = "anonymous", ["upload"] = 655360, ["download"] = 655360, ["maxUploadSize"] = 1073741824, ["registry"] = 250 } - --- no limits applied -local no_limits = { ["tierID"] = -1, ["tierName"] = "internal", ["upload"] = 0, ["download"] = 0, ["maxUploadSize"] = 0, ["registry"] = 0 } - -- constant tier ids local tier_id_internal = -1 local tier_id_anonymous = 0 local tier_id_free = 1 +-- fallback - remember to keep those updated +local anon_limits = { + ["tierID"] = tier_id_anonymous, + ["tierName"] = "anonymous", + ["upload"] = 655360, + ["download"] = 655360, + ["maxUploadSize"] = 1073741824, + ["registry"] = 250 +} + +-- no limits applied +local no_limits = { + ["tierID"] = tier_id_internal, + ["tierName"] = "internal", + ["upload"] = 0, + ["download"] = 0, + ["maxUploadSize"] = 0, + ["registry"] = 0 +} + -- handle request exit when access to portal should be restricted to authenticated users only function _M.exit_access_unauthorized(message) ngx.status = ngx.HTTP_UNAUTHORIZED