WIP: v1.99-internal version for Deuxfleurs use only #964

Draft
lx wants to merge 165 commits from v1.99-internal into hotfix/1.0.0-rc1-red-ftr-wquorum
2 changed files with 12 additions and 4 deletions
Showing only changes of commit 0a2e809cb9 - Show all commits

View file

@ -419,13 +419,17 @@ pub async fn handle_update_bucket(
if let Some(wa) = req.website_access {
if wa.enabled {
let (redirect_all, routing_rules) = match state.website_config.get() {
Some(wc) => (wc.redirect_all.clone(), wc.routing_rules.clone()),
None => (None, Vec::new()),
};
state.website_config.update(Some(WebsiteConfig {
index_document: wa.index_document.ok_or_bad_request(
"Please specify indexDocument when enabling website access.",
)?,
error_document: wa.error_document,
redirect_all: None,
routing_rules: Vec::new(),
redirect_all,
routing_rules,
}));
} else {
if wa.index_document.is_some() || wa.error_document.is_some() {

View file

@ -390,11 +390,15 @@ impl AdminRpcHandler {
}
let website = if query.allow {
let (redirect_all, routing_rules) = match bucket_state.website_config.get() {
Some(wc) => (wc.redirect_all.clone(), wc.routing_rules.clone()),
None => (None, Vec::new()),
};
Some(WebsiteConfig {
index_document: query.index_document.clone(),
error_document: query.error_document.clone(),
redirect_all: None,
routing_rules: Vec::new(),
redirect_all,
routing_rules,
})
} else {
None