Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/acme/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,11 @@ async fn save_cert_to_proxy_path(
fs::create_dir_all(cert_dir).await
.with_context(|| format!("Failed to create proxy_certificates directory: {}", proxy_certificates_path))?;

// Normalize domain name (remove wildcard prefix if present) before sanitizing
// This ensures the filename matches what the certificate worker expects
let normalized_domain = domain.strip_prefix("*.").unwrap_or(domain);
// Sanitize domain name for filename (replace . with _ and * with _)
let sanitized_domain = domain.replace('.', "_").replace('*', "_");
let sanitized_domain = normalized_domain.replace('.', "_").replace('*', "_");
let cert_path = cert_dir.join(format!("{}.crt", sanitized_domain));
let key_path = cert_dir.join(format!("{}.key", sanitized_domain));

Expand Down
4 changes: 4 additions & 0 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,10 @@ pub struct Args {
#[arg(long, short = 'c')]
pub config: Option<PathBuf>,

/// Clear a specific certificate from local filesystem and Redis
#[arg(long)]
pub clear_certificate: Option<String>,

/// Redis connection URL for ACME cache storage.
#[arg(long, default_value = "redis://127.0.0.1/0")]
pub redis_url: String,
Expand Down
Loading