refactor(captcha): load answer from env dynamically
This commit is contained in:
@@ -63,6 +63,11 @@ class Config:
|
||||
except FileNotFoundError:
|
||||
return default_captcha
|
||||
|
||||
def _load_captcha_answer(self):
|
||||
"""Load captcha answer from environment variable (supports live reload)"""
|
||||
load_dotenv(override=True) # Reload .env file
|
||||
return os.getenv(key="CAPTCHA_ANSWER", default=None)
|
||||
|
||||
def _load(self):
|
||||
load_dotenv()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user