WIP: feat: x-amz-website-redirect-location support #872

Draft
raitobezarius wants to merge 5 commits from raitobezarius/garage:redirect-meta into main

5 commits

Author SHA1 Message Date
Raito Bezarius
5275ae60b0 chore(flake-inputs): use a cargo2nix reference without a deprecated Nix feature
Some checks failed
ci/woodpecker/pr/debug Pipeline failed
Otherwise, this make it hard for people with strict deprecation policies
to use the devshell.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-03 16:58:55 +02:00
Raito Bezarius
b05e20901e chore(devshell): add cargo2nix to it
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-03 16:58:55 +02:00
Raito Bezarius
6db21f1bd5 tests(api): test redirections for the S3 API
This implements a 2-long chain of redirections.
2024-09-03 16:58:55 +02:00
Raito Bezarius
b99aaa8351 feat(api|web): follow through metadata-driven redirects
This is an implementation of the GET handler for the
`x-amz-website-redirect-location`.

This implements the semantics described in
https://docs.aws.amazon.com/AmazonS3/latest/userguide/how-to-page-redirect.html
for the S3 API and the web API.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-03 16:46:57 +02:00
Raito Bezarius
647b2dae33 feat(api|web): persist x-amz-website-redirect-location directives
This offers to a user the possibility to PUT Object (and their copy
variants as long as the metadata directive is to REPLACE and not COPY)
with a redirection as per
https://docs.aws.amazon.com/AmazonS3/latest/userguide/how-to-page-redirect.html.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-03 16:37:26 +02:00