web: implement x-amz-website-redirect-location #966

Merged
lx merged 1 commit from redirect-location-header into main 2025-02-19 16:10:04 +00:00
Owner
No description provided.
lx added 1 commit 2025-02-19 16:04:33 +00:00
web: implement x-amz-website-redirect-location
All checks were successful
ci/woodpecker/push/debug Pipeline was successful
ci/woodpecker/pr/debug Pipeline was successful
bf27a3ec98
lx added this to the v1.1 milestone 2025-02-19 16:04:59 +00:00
lx merged commit 2191620af5 into main 2025-02-19 16:10:04 +00:00
lx deleted branch redirect-location-header 2025-02-19 16:10:05 +00:00
trinity-1686a reviewed 2025-02-19 16:46:38 +00:00
@ -298,0 +302,4 @@
(Ok(ret), _) if ret.headers().contains_key(X_AMZ_WEBSITE_REDIRECT_LOCATION) => {
let redirect_location = ret.headers().get(X_AMZ_WEBSITE_REDIRECT_LOCATION).unwrap();
Ok(Response::builder()
.status(StatusCode::MOVED_PERMANENTLY)

doesn't permanent redirect seem a bit too long for this use case? Is it what aws does?

doesn't permanent redirect seem a bit too long for this use case? Is it what aws does?
Author
Owner
Yes, AWS sends a 301 redirect code: https://docs.aws.amazon.com/AmazonS3/latest/userguide/how-to-page-redirect.html#redirect-requests-object-metadata

okay, i think it's a bad idea, but if it's what aws does...

okay, i think it's a bad idea, but if it's what aws does...
trinity-1686a marked this conversation as resolved
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#966
No description provided.