From 86b49e41492ab3347d483639283da1543162949f Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Fri, 6 Dec 2024 12:55:42 -0800 Subject: [PATCH] redact ASYNC_DB_URL similarly to DB_URL when overridden in config --- reflex/config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/reflex/config.py b/reflex/config.py index 7a29c811a..50748347a 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -571,6 +571,10 @@ class EnvironmentVariables: environment = EnvironmentVariables() +# These vars are not logged because they may contain sensitive information. +_sensitive_env_vars = {"DB_URL", "ASYNC_DB_URL"} + + class Config(Base): """The config defines runtime settings for the app. @@ -754,7 +758,7 @@ class Config(Base): # If the env var is set, override the config value. if env_var is not None: - if key.upper() != "DB_URL": + if key.upper() not in _sensitive_env_vars: console.info( f"Overriding config value {key} with env var {key.upper()}={env_var}", dedupe=True,