diff options
author | Alex <lx@deuxfleurs.fr> | 2025-02-19 16:10:04 +0000 |
---|---|---|
committer | Alex <lx@deuxfleurs.fr> | 2025-02-19 16:10:04 +0000 |
commit | 2191620af5d836045d9e1b7d98bc61acba3879ed (patch) | |
tree | b6f1f1552f38de61ca8309942e5e2dd682a6e876 /src/api/s3/website.rs | |
parent | f64ec6e542c73a4eaaf1962330c7bfe4d7c47461 (diff) | |
parent | bf27a3ec9844cf86f2a7ca67b94e7fb8db3873df (diff) | |
download | garage-2191620af5d836045d9e1b7d98bc61acba3879ed.tar.gz garage-2191620af5d836045d9e1b7d98bc61acba3879ed.zip |
Merge pull request 'web: implement x-amz-website-redirect-location' (#966) from redirect-location-header into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/966
Diffstat (limited to 'src/api/s3/website.rs')
-rw-r--r-- | src/api/s3/website.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/api/s3/website.rs b/src/api/s3/website.rs index 7553bef7..03cc01d8 100644 --- a/src/api/s3/website.rs +++ b/src/api/s3/website.rs @@ -1,6 +1,6 @@ use quick_xml::de::from_reader; -use hyper::{Request, Response, StatusCode}; +use hyper::{header::HeaderName, Request, Response, StatusCode}; use serde::{Deserialize, Serialize}; use garage_model::bucket_table::*; @@ -11,6 +11,9 @@ use crate::api_server::{ReqBody, ResBody}; use crate::error::*; use crate::xml::{to_xml_with_header, xmlns_tag, IntValue, Value}; +pub const X_AMZ_WEBSITE_REDIRECT_LOCATION: HeaderName = + HeaderName::from_static("x-amz-website-redirect-location"); + pub async fn handle_get_website(ctx: ReqCtx) -> Result<Response<ResBody>, Error> { let ReqCtx { bucket_params, .. } = ctx; if let Some(website) = bucket_params.website_config.get() { |