feat(config): load secret files even without main config

When no configuration file is found or readable, the server now still loads secret files. This ensures that secret configurations (like API keys or passwords) are available even if the primary config file is missing, improving robustness and security in environments where secrets are stored separately.
This commit is contained in:
YueGuobin 2026-03-03 18:16:37 +08:00
parent 8e43ad4912
commit aef337e86f

View File

@ -261,6 +261,8 @@ class Config:
if not parsed_files:
log.warning("No configuration file could be found or read")
self._settings = ServerConfig()
# Still load secret files even without a config file
self._load_secret_files()
return
for file in parsed_files: