|
|
@ -18,7 +18,9 @@ use crate::{
|
|
|
|
db::{backup_database, get_sql_server_version, models::*, DbConn, DbConnType},
|
|
|
|
db::{backup_database, get_sql_server_version, models::*, DbConn, DbConnType},
|
|
|
|
error::{Error, MapResult},
|
|
|
|
error::{Error, MapResult},
|
|
|
|
mail,
|
|
|
|
mail,
|
|
|
|
util::{format_naive_datetime_local, get_display_size, get_reqwest_client, is_running_in_docker},
|
|
|
|
util::{
|
|
|
|
|
|
|
|
docker_base_image, format_naive_datetime_local, get_display_size, get_reqwest_client, is_running_in_docker,
|
|
|
|
|
|
|
|
},
|
|
|
|
CONFIG,
|
|
|
|
CONFIG,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -492,6 +494,7 @@ fn diagnostics(_token: AdminToken, ip_header: IpHeader, conn: DbConn) -> ApiResu
|
|
|
|
|
|
|
|
|
|
|
|
// Execute some environment checks
|
|
|
|
// Execute some environment checks
|
|
|
|
let running_within_docker = is_running_in_docker();
|
|
|
|
let running_within_docker = is_running_in_docker();
|
|
|
|
|
|
|
|
let docker_base_image = docker_base_image();
|
|
|
|
let has_http_access = has_http_access();
|
|
|
|
let has_http_access = has_http_access();
|
|
|
|
let uses_proxy = env::var_os("HTTP_PROXY").is_some()
|
|
|
|
let uses_proxy = env::var_os("HTTP_PROXY").is_some()
|
|
|
|
|| env::var_os("http_proxy").is_some()
|
|
|
|
|| env::var_os("http_proxy").is_some()
|
|
|
@ -549,6 +552,7 @@ fn diagnostics(_token: AdminToken, ip_header: IpHeader, conn: DbConn) -> ApiResu
|
|
|
|
"web_vault_version": web_vault_version.version,
|
|
|
|
"web_vault_version": web_vault_version.version,
|
|
|
|
"latest_web_build": latest_web_build,
|
|
|
|
"latest_web_build": latest_web_build,
|
|
|
|
"running_within_docker": running_within_docker,
|
|
|
|
"running_within_docker": running_within_docker,
|
|
|
|
|
|
|
|
"docker_base_image": docker_base_image,
|
|
|
|
"has_http_access": has_http_access,
|
|
|
|
"has_http_access": has_http_access,
|
|
|
|
"ip_header_exists": &ip_header.0.is_some(),
|
|
|
|
"ip_header_exists": &ip_header.0.is_some(),
|
|
|
|
"ip_header_match": ip_header_name == CONFIG.ip_header(),
|
|
|
|
"ip_header_match": ip_header_name == CONFIG.ip_header(),
|
|
|
|