mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-10-10 20:45:48 +08:00
A couple of small fixes in the recently-added Azure blob storage support (#910)
Notably, renaming the "access-key" configuration field to "azure-access-key", not because stalwart-mailserver needs the field name to change, but because having a field whose name is the same between Azure and S3 but whose function is different, causes headaches for webadmin.
This commit is contained in:
parent
572275eecc
commit
3b950cecec
1 changed files with 3 additions and 2 deletions
|
@ -32,7 +32,7 @@ impl AzureStore {
|
||||||
let container = config.value_require((&prefix, "container"))?.to_string();
|
let container = config.value_require((&prefix, "container"))?.to_string();
|
||||||
|
|
||||||
let credentials = match (
|
let credentials = match (
|
||||||
config.value((&prefix, "access-key")),
|
config.value((&prefix, "azure-access-key")),
|
||||||
config.value((&prefix, "sas-token")),
|
config.value((&prefix, "sas-token")),
|
||||||
) {
|
) {
|
||||||
(Some(access_key), None) => {
|
(Some(access_key), None) => {
|
||||||
|
@ -53,7 +53,7 @@ impl AzureStore {
|
||||||
prefix.as_str(),
|
prefix.as_str(),
|
||||||
concat!(
|
concat!(
|
||||||
"Failed to create credentials: exactly one of ",
|
"Failed to create credentials: exactly one of ",
|
||||||
"'access-key' and 'sas-token' must be specified"
|
"'azure-access-key' and 'sas-token' must be specified"
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
return None;
|
return None;
|
||||||
|
@ -126,6 +126,7 @@ impl AzureStore {
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
err = Some(e);
|
err = Some(e);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue