feat: add base_path to api

Lets you replace /api with whatever you want!
This commit is contained in:
Radical 2025-05-29 20:41:50 +02:00
parent 3c5f3fd654
commit 94c4428bb0
3 changed files with 6 additions and 3 deletions

View file

@ -38,6 +38,7 @@ pub struct CacheDatabase {
struct WebBuilder {
ip: Option<String>,
port: Option<u16>,
base_path: Option<String>,
frontend_url: Url,
_ssl: Option<bool>,
}
@ -85,6 +86,7 @@ impl ConfigBuilder {
let web = Web {
ip: self.web.ip.unwrap_or(String::from("0.0.0.0")),
port: self.web.port.unwrap_or(8080),
base_path: self.web.base_path.unwrap_or("".to_string()),
frontend_url: self.web.frontend_url,
};
@ -146,6 +148,7 @@ pub struct Config {
pub struct Web {
pub ip: String,
pub port: u16,
pub base_path: String,
pub frontend_url: Url,
}