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