Fix Redis authentication: use password-only auth without username

- Removed automatic username addition for Redis URLs
- Redis works with password-only authentication
- Fixed connection issues with Dokku Redis service
This commit is contained in:
2025-09-02 19:02:59 +03:00
parent eefdfe6d5d
commit eccd3cd27e

View File

@@ -60,14 +60,12 @@ impl AppState {
log::warn!(" Username: '{}'", username); log::warn!(" Username: '{}'", username);
log::warn!(" Password: {}", if password.is_some() { "***" } else { "none" }); log::warn!(" Password: {}", if password.is_some() { "***" } else { "none" });
// Если username пустой и есть пароль, исправляем URL // Если username пустой и есть пароль, оставляем как есть
if username.is_empty() && password.is_some() { // Redis может работать только с паролем без username
let corrected_url = redis_url.replace("redis://:", "redis://redis:"); if username.is_empty() && password.is_some() {
log::warn!(" 🔧 Correcting URL to use explicit username 'redis'"); log::warn!(" 🔧 Using password-only authentication (no username)");
corrected_url }
} else { redis_url
redis_url
}
} }
Err(e) => { Err(e) => {
log::error!("❌ Failed to parse Redis URL: {}", e); log::error!("❌ Failed to parse Redis URL: {}", e);