add status endpoint to config and update proxy to return them
This commit is contained in:
@@ -3,6 +3,7 @@ use serde::{Deserialize, Serialize};
|
|||||||
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
|
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
|
||||||
pub struct ClientConfig {
|
pub struct ClientConfig {
|
||||||
pub proxy_url: Option<String>,
|
pub proxy_url: Option<String>,
|
||||||
|
pub status_url: Option<String>,
|
||||||
pub cert_hash: Option<Vec<u8>>,
|
pub cert_hash: Option<Vec<u8>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+6
-2
@@ -81,8 +81,12 @@ async fn main() -> Result<()> {
|
|||||||
.install_default()
|
.install_default()
|
||||||
.map_err(|e| anyhow!("could not install crypto provider {e:?}"))?;
|
.map_err(|e| anyhow!("could not install crypto provider {e:?}"))?;
|
||||||
|
|
||||||
let mut client_config = ClientConfig::default();
|
let mut client_config = ClientConfig {
|
||||||
client_config.proxy_url = Some(server_config.public_url.join("proxy")?.to_string());
|
proxy_url: Some(server_config.public_url.join("proxy")?.to_string()),
|
||||||
|
status_url: Some(server_config.public_url.join("status")?.to_string()),
|
||||||
|
cert_hash: None,
|
||||||
|
};
|
||||||
|
|
||||||
let (cert, key) = match (&server_config.cert_path, &server_config.key_path) {
|
let (cert, key) = match (&server_config.cert_path, &server_config.key_path) {
|
||||||
(None, None) => {
|
(None, None) => {
|
||||||
info!("generating self-signed cert");
|
info!("generating self-signed cert");
|
||||||
|
|||||||
Reference in New Issue
Block a user