mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 03:55:07 +08:00
allow to listen on unix domain sockets
This commit is contained in:
parent
bf95438ea8
commit
00d15fe43b
@ -153,7 +153,11 @@ async fn run_http(
|
|||||||
if let Some(config) = opt_clone.get_ssl_config()? {
|
if let Some(config) = opt_clone.get_ssl_config()? {
|
||||||
http_server.bind_rustls_021(opt_clone.http_addr, config)?.run().await?;
|
http_server.bind_rustls_021(opt_clone.http_addr, config)?.run().await?;
|
||||||
} else {
|
} else {
|
||||||
http_server.bind(&opt_clone.http_addr)?.run().await?;
|
if opt_clone.http_addr.starts_with("/") {
|
||||||
|
http_server.bind_uds(&opt_clone.http_addr)?.run().await?
|
||||||
|
} else {
|
||||||
|
http_server.bind(&opt_clone.http_addr)?.run().await?
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
@ -166,7 +170,13 @@ pub fn print_launch_resume(
|
|||||||
let build_info = build_info::BuildInfo::from_build();
|
let build_info = build_info::BuildInfo::from_build();
|
||||||
|
|
||||||
let protocol =
|
let protocol =
|
||||||
if opt.ssl_cert_path.is_some() && opt.ssl_key_path.is_some() { "https" } else { "http" };
|
if opt.ssl_cert_path.is_some() && opt.ssl_key_path.is_some() {
|
||||||
|
"https"
|
||||||
|
} else if opt.http_addr.starts_with("/") {
|
||||||
|
"unix"
|
||||||
|
} else {
|
||||||
|
"http"
|
||||||
|
};
|
||||||
let ascii_name = r#"
|
let ascii_name = r#"
|
||||||
888b d888 d8b 888 d8b 888
|
888b d888 d8b 888 d8b 888
|
||||||
8888b d8888 Y8P 888 Y8P 888
|
8888b d8888 Y8P 888 Y8P 888
|
||||||
|
Loading…
Reference in New Issue
Block a user