mirror of
https://github.com/sadoyan/aralez.git
synced 2026-06-18 13:14:07 +08:00
Add TLS to API server
This commit is contained in:
@@ -11,6 +11,9 @@ pub struct FromFileProvider {
|
||||
pub struct APIUpstreamProvider {
|
||||
pub address: String,
|
||||
pub masterkey: String,
|
||||
pub tls_address: Option<String>,
|
||||
pub tls_certificate: Option<String>,
|
||||
pub tls_key_file: Option<String>,
|
||||
}
|
||||
|
||||
pub struct ConsulProvider {
|
||||
@@ -25,7 +28,7 @@ pub trait Discovery {
|
||||
#[async_trait]
|
||||
impl Discovery for APIUpstreamProvider {
|
||||
async fn start(&self, toreturn: Sender<Configuration>) {
|
||||
webserver::run_server(self.address.clone(), self.masterkey.clone(), toreturn).await;
|
||||
webserver::run_server(self, toreturn).await;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user