Constellation, Spacedust, Slingshot, UFOs: atproto crates and services for microcosm

add acme contact

idk if this helps rate-limiting, prob not

Changed files
+11 -1
slingshot
+6
slingshot/src/main.rs
···
/// - TODO: a rate-limiter will be installed
#[arg(long)]
host: Option<String>,
+
/// email address for letsencrypt contact
+
///
+
/// recommended in production, i guess?
+
#[arg(long)]
+
acme_contact: Option<String>,
/// a location to cache acme https certs
///
/// only used if --host is specified. omitting requires re-requesting certs
···
identity,
repo,
args.host,
+
args.acme_contact,
args.certs,
server_shutdown,
)
+5 -1
slingshot/src/server.rs
···
identity: Identity,
repo: Repo,
host: Option<String>,
+
acme_contact: Option<String>,
certs: Option<PathBuf>,
_shutdown: CancellationToken,
) -> Result<(), ServerError> {
···
let mut auto_cert = AutoCert::builder()
.directory_url(LETS_ENCRYPT_PRODUCTION)
.domain(&host);
+
if let Some(contact) = acme_contact {
+
auto_cert = auto_cert.contact(contact);
+
}
if let Some(certs) = certs {
-
auto_cert = auto_cert.cache_path(certs)
+
auto_cert = auto_cert.cache_path(certs);
}
let auto_cert = auto_cert.build().map_err(ServerError::AcmeBuildError)?;