feat: add base_path to api
Lets you replace /api with whatever you want!
This commit is contained in:
parent
3c5f3fd654
commit
94c4428bb0
3 changed files with 6 additions and 3 deletions
|
@ -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,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue