revert: removing production URL default logic (requested by user)
Some checks failed
GBCI / build (push) Has been cancelled
Some checks failed
GBCI / build (push) Has been cancelled
This commit is contained in:
parent
c643a59e29
commit
a3babbcaa7
1 changed files with 2 additions and 20 deletions
|
|
@ -294,16 +294,7 @@ impl AppConfig {
|
||||||
server: ServerConfig {
|
server: ServerConfig {
|
||||||
host: get_str("server_host", "0.0.0.0"),
|
host: get_str("server_host", "0.0.0.0"),
|
||||||
port: get_u16("server_port", 8080),
|
port: get_u16("server_port", 8080),
|
||||||
base_url: config_map.get("server_base_url").cloned().unwrap_or_else(|| {
|
base_url: config_map.get("server_base_url").cloned().unwrap_or_else(|| "http://localhost:8080".to_string()),
|
||||||
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()
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
},
|
},
|
||||||
site_path: {
|
site_path: {
|
||||||
ConfigManager::new(pool.clone()).get_config(
|
ConfigManager::new(pool.clone()).get_config(
|
||||||
|
|
@ -336,16 +327,7 @@ impl AppConfig {
|
||||||
server: ServerConfig {
|
server: ServerConfig {
|
||||||
host: "0.0.0.0".to_string(),
|
host: "0.0.0.0".to_string(),
|
||||||
port: 8080,
|
port: 8080,
|
||||||
base_url: {
|
base_url: "http://localhost:8080".to_string(),
|
||||||
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()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
site_path: "./botserver-stack/sites".to_string(),
|
site_path: "./botserver-stack/sites".to_string(),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue