aboutsummaryrefslogtreecommitdiffstats
path: root/atuin-server/src/settings.rs
diff options
context:
space:
mode:
authormorguldir <morguldir@protonmail.com>2022-07-26 09:05:34 +0200
committerGitHub <noreply@github.com>2022-07-26 08:05:34 +0100
commit0c5e250800f1b8f50ea832bf414a5a7cdfe944a4 (patch)
tree9ee6802b12d0400d34c3d07f484d88c081d146a1 /atuin-server/src/settings.rs
parentAdd kubernetes instructions and manifests (#427) (diff)
downloadatuin-0c5e250800f1b8f50ea832bf414a5a7cdfe944a4.zip
Add support for prepending a path to all routes for the server (#484)
* Add support for prepending a path to all routes * Don't nest if there is no path provided Co-authored-by: Conrad Ludgate <oon@conradludgate.com> * Change the default for the path variable * run cargo-fmt Co-authored-by: Conrad Ludgate <oon@conradludgate.com>
Diffstat (limited to 'atuin-server/src/settings.rs')
-rw-r--r--atuin-server/src/settings.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/atuin-server/src/settings.rs b/atuin-server/src/settings.rs
index b0e07b71..8da0c0aa 100644
--- a/atuin-server/src/settings.rs
+++ b/atuin-server/src/settings.rs
@@ -11,6 +11,7 @@ pub const HISTORY_PAGE_SIZE: i64 = 100;
pub struct Settings {
pub host: String,
pub port: u16,
+ pub path: String,
pub db_uri: String,
pub open_registration: bool,
pub max_history_length: usize,
@@ -35,6 +36,7 @@ impl Settings {
.set_default("port", 8888)?
.set_default("open_registration", false)?
.set_default("max_history_length", 8192)?
+ .set_default("path", "")?
.add_source(
Environment::with_prefix("atuin")
.prefix_separator("_")