Use axum-server for direct TLS support

This commit is contained in:
Jonas Platte 2022-01-22 18:38:39 +01:00
parent 5fa9190117
commit c8951a1d9c
No known key found for this signature in database
GPG key ID: 7D261D771D915378
4 changed files with 57 additions and 10 deletions

View file

@ -17,6 +17,8 @@ pub struct Config {
pub address: IpAddr,
#[serde(default = "default_port")]
pub port: u16,
pub tls: Option<TlsConfig>,
pub server_name: Box<ServerName>,
#[serde(default = "default_database_backend")]
pub database_backend: String,
@ -69,6 +71,12 @@ pub struct Config {
pub catchall: BTreeMap<String, IgnoredAny>,
}
#[derive(Clone, Debug, Deserialize)]
pub struct TlsConfig {
pub certs: String,
pub key: String,
}
const DEPRECATED_KEYS: &[&str] = &["cache_capacity"];
impl Config {