revert: removing production URL default logic (requested by user)
Some checks failed
GBCI / build (push) Has been cancelled

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-01-25 22:48:47 -03:00
parent c643a59e29
commit a3babbcaa7

View file

@ -294,16 +294,7 @@ impl AppConfig {
server: ServerConfig {
host: get_str("server_host", "0.0.0.0"),
port: get_u16("server_port", 8080),
base_url: config_map.get("server_base_url").cloned().unwrap_or_else(|| {
let is_prod = std::env::var("BOTSERVER_ENV")
.map(|v| v == "production" || v == "prod")
.unwrap_or(false);
if is_prod {
"https://system.pragmatismo.com.br/".to_string()
} else {
"http://localhost:8080".to_string()
}
}),
base_url: config_map.get("server_base_url").cloned().unwrap_or_else(|| "http://localhost:8080".to_string()),
},
site_path: {
ConfigManager::new(pool.clone()).get_config(
@ -336,16 +327,7 @@ impl AppConfig {
server: ServerConfig {
host: "0.0.0.0".to_string(),
port: 8080,
base_url: {
let is_prod = std::env::var("BOTSERVER_ENV")
.map(|v| v == "production" || v == "prod")
.unwrap_or(false);
if is_prod {
"https://system.pragmatismo.com.br/".to_string()
} else {
"http://localhost:8080".to_string()
}
},
base_url: "http://localhost:8080".to_string(),
},
site_path: "./botserver-stack/sites".to_string(),