Update config

This commit is contained in:
Harrison Burt 2022-03-30 21:58:24 +01:00
parent 6ea3c9b113
commit a40cff10d7
2 changed files with 3 additions and 3 deletions

View File

@ -84,7 +84,7 @@ pub struct RuntimeConfig {
/// The base path to serve images from.
///
/// Defaults to `/images`.
/// Defaults to `/`.
pub base_serving_path: Option<String>,
/// The global cache handler.

View File

@ -85,7 +85,7 @@ async fn main() -> Result<()> {
p
} else {
"/images".to_string()
"".to_string()
};
let api_service = OpenApiService::new(
@ -94,7 +94,7 @@ async fn main() -> Result<()> {
env!("CARGO_PKG_VERSION"),
)
.description(include_str!("../description.md"))
.server(args.docs_url.unwrap_or_else(|| format!("http://{}/v1", &bind)));
.server(args.docs_url.unwrap_or_else(|| format!("http://{}/v1{}", &bind, &serving_path)));
let ui = api_service.redoc();
let spec = api_service.spec();