Domain link Update
This commit is contained in:
+13
-1
@@ -124,7 +124,10 @@ fn load_config() -> Config {
|
||||
.parse::<usize>()
|
||||
.expect("Invalid CHUNK_SIZE_KB")
|
||||
* 1024,
|
||||
domain: std::env::var("DOMAIN").ok().map(|d| d.trim_end_matches('/').to_string()),
|
||||
domain: std::env::var("DOMAIN")
|
||||
.ok()
|
||||
.map(|d| d.trim().trim_end_matches('/').to_string())
|
||||
.filter(|d| !d.is_empty()),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,8 +229,17 @@ async fn list_files(State(state): State<AppState>) -> Html<String> {
|
||||
.config
|
||||
.domain
|
||||
.clone()
|
||||
.map(|d| {
|
||||
if d.contains("://") {
|
||||
d
|
||||
} else {
|
||||
format!("https://{}", d)
|
||||
}
|
||||
})
|
||||
.unwrap_or_else(|| format!("http://localhost:{}", state.config.port));
|
||||
|
||||
tracing::info!("Using base URL for commands: {}", base_url);
|
||||
|
||||
let mut file_list_items = String::new();
|
||||
|
||||
// Sort files by ID for consistent display order
|
||||
|
||||
Reference in New Issue
Block a user