mirror of
https://github.com/getnora-io/nora.git
synced 2026-04-12 16:10:31 +00:00
refactor: extract basic_auth_header helper, add plaintext credential warnings
- basic_auth_header() in config.rs replaces 6 inline STANDARD.encode calls - warn_plaintext_credentials() logs warning at startup if auth is in config.toml - All protocol handlers use shared helper instead of duplicating base64 logic
This commit is contained in:
@@ -289,6 +289,9 @@ async fn run_server(config: Config, storage: Storage) {
|
||||
let storage_path = config.storage.path.clone();
|
||||
let rate_limit_enabled = config.rate_limit.enabled;
|
||||
|
||||
// Warn about plaintext credentials in config.toml
|
||||
config.warn_plaintext_credentials();
|
||||
|
||||
// Initialize Docker auth with proxy timeout
|
||||
let docker_auth = registry::DockerAuth::new(config.docker.proxy_timeout);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user