mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-29 16:45:30 +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()? {
|
||||
http_server.bind_rustls_021(opt_clone.http_addr, config)?.run().await?;
|
||||
} 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(())
|
||||
}
|
||||
@ -166,7 +170,13 @@ pub fn print_launch_resume(
|
||||
let build_info = build_info::BuildInfo::from_build();
|
||||
|
||||
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#"
|
||||
888b d888 d8b 888 d8b 888
|
||||
8888b d8888 Y8P 888 Y8P 888
|
||||
|
Loading…
Reference in New Issue
Block a user