Allow setting index document and error document on the CLI
This commit is contained in:
parent
3ea8ca1b9e
commit
9eb211948e
@ -404,8 +404,8 @@ impl AdminRpcHandler {
|
|||||||
|
|
||||||
let website = if query.allow {
|
let website = if query.allow {
|
||||||
Some(WebsiteConfig {
|
Some(WebsiteConfig {
|
||||||
index_document: "index.html".into(),
|
index_document: query.index_document.clone(),
|
||||||
error_document: None,
|
error_document: query.error_document.clone(),
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
|
@ -188,6 +188,14 @@ pub struct WebsiteOpt {
|
|||||||
|
|
||||||
/// Bucket name
|
/// Bucket name
|
||||||
pub bucket: String,
|
pub bucket: String,
|
||||||
|
|
||||||
|
/// Index document: the suffix appended to request paths ending by /
|
||||||
|
#[structopt(short = "i", long = "index-document", default_value = "index.html")]
|
||||||
|
pub index_document: String,
|
||||||
|
|
||||||
|
/// Error document: the optionnal document returned when an error occurs
|
||||||
|
#[structopt(short = "e", long = "error-document")]
|
||||||
|
pub error_document: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, StructOpt, Debug)]
|
#[derive(Serialize, Deserialize, StructOpt, Debug)]
|
||||||
|
Loading…
Reference in New Issue
Block a user