Pos teste de instalação
This commit is contained in:
@@ -127,14 +127,15 @@ def normalize_config(data: dict, default_password: str) -> dict:
|
||||
return config
|
||||
|
||||
|
||||
def load_license_key(require_env: bool) -> bytes:
|
||||
env_key = os.getenv("VFM_LICENSE_MASTER_KEY")
|
||||
if env_key:
|
||||
return env_key.encode("utf-8")
|
||||
if require_env:
|
||||
raise RuntimeError(
|
||||
"VFM_LICENSE_MASTER_KEY e obrigatoria em producao. Defina a variavel de ambiente antes de iniciar o sistema."
|
||||
)
|
||||
def load_license_key(require_env: bool) -> bytes:
|
||||
env_key = os.getenv("VFM_LICENSE_MASTER_KEY")
|
||||
allow_legacy = os.getenv("VFM_ALLOW_LEGACY_LICENSE_KEY", os.getenv("ALLOW_LEGACY_LICENSE_KEY", "0")) == "1"
|
||||
if env_key:
|
||||
return env_key.encode("utf-8")
|
||||
if require_env and not allow_legacy:
|
||||
raise RuntimeError(
|
||||
"VFM_LICENSE_MASTER_KEY e obrigatoria em producao. Defina a variavel de ambiente antes de iniciar o sistema."
|
||||
)
|
||||
LOGGER.warning(
|
||||
"VFM_LICENSE_MASTER_KEY nao definido. Usando chave legada embutida; mova a chave para variavel de ambiente."
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user