aboutsummaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-01-03 15:06:19 +0100
committerAlex Auvolat <alex@adnab.me>2022-01-04 12:52:46 +0100
commit2140cd72054ac6e3a94cbe5931727159de20a97f (patch)
tree0026752b9cdc5f3db07a5e06fd55cb9e9a4d5c9d /src/api
parentbeeef4758e5ec0d521179a799a3237c2c0368911 (diff)
downloadgarage-2140cd72054ac6e3a94cbe5931727159de20a97f.tar.gz
garage-2140cd72054ac6e3a94cbe5931727159de20a97f.zip
Remove website redirects
Diffstat (limited to 'src/api')
-rw-r--r--src/api/s3_website.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/api/s3_website.rs b/src/api/s3_website.rs
index 1ea57577..8686b832 100644
--- a/src/api/s3_website.rs
+++ b/src/api/s3_website.rs
@@ -170,16 +170,16 @@ impl WebsiteConfiguration {
}
pub fn into_garage_website_config(self) -> Result<WebsiteConfig, Error> {
- if let Some(rart) = self.redirect_all_requests_to {
- Ok(WebsiteConfig::RedirectAll {
- hostname: rart.hostname.0,
- protocol: rart
- .protocol
- .map(|x| x.0)
- .unwrap_or_else(|| "http".to_string()),
- })
+ if self.redirect_all_requests_to.is_some() {
+ Err(Error::NotImplemented(
+ "S3 website redirects are not currently implemented in Garage.".into(),
+ ))
+ } else if self.routing_rules.map(|x| !x.is_empty()).unwrap_or(false) {
+ Err(Error::NotImplemented(
+ "S3 routing rules are not currently implemented in Garage.".into(),
+ ))
} else {
- Ok(WebsiteConfig::Website {
+ Ok(WebsiteConfig {
index_document: self
.index_document
.map(|x| x.suffix.0)