Closed JuroOravec closed 2 months ago
Hello,
Thanks for this issue. Yes, documentation is wrong and must be updated.
Oxyno-zeta
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days
Not stale
I've fixed the documentation. Thanks for the issue !
Description
The docs for key rewrite suggest the following:
Given this config:
Then GET
/file.html
should be rewritten to GET/folder1/redirected/file.html
.HOWEVER, it seems that currently, the source regex MUST account also for the prefix.
So, to redirect from
/file.html
to/folder1/redirected/file.html
, given a bucket prefix/folder1
, we need to do:The reason for this is because in the code, currently the logic to get the full path including the prefix is called BEFORE the regex matching logic. See https://github.com/oxyno-zeta/s3-proxy/blob/8f1e39b3589171bfd94e1d25cd85c4b8c19e5374/pkg/s3-proxy/bucket/bucket-req-impl.go#L131
Describe the solution you'd like
Update the docs to include the correct examples.