-
Notifications
You must be signed in to change notification settings - Fork 2.7k
feat: implement 'rewrite' storage middleware #4146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: implement 'rewrite' storage middleware #4146
Conversation
58547e7 to
24ad324
Compare
milosgajdos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems reasonable to me.
PTAL @thaJeztah @Jamstah @davidspek
|
ping @thaJeztah @Jamstah |
|
@corhere mind having a look at this? Thanks 🙇 |
|
Ping @thaJeztah @squizzi |
davidspek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@smira mind adding some basics docs in, please? |
24ad324 to
97f8d92
Compare
done, rebased, adapted to the changes |
milosgajdos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @smira, mind fixing the YAML indentation I mentioned in my comments, please?
This allows to rewrite 'URLFor' of the storage driver to use a specific host/trim the base path. It is different from the 'redirect' middleware, as it still calls the storage driver URLFor. For example, with Azure storage provider, this allows to transform the SAS Azure Blob Storage URL into the URL compatible with Azure Front Door. Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
97f8d92 to
558ace1
Compare
distribution#4146 introduced a new rewrite storage middleware but somehow missed to update the init logging message. This commit fixes that. Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This allows to rewrite 'URLFor' of the storage driver to use a specific host/trim the base path.
It is different from the 'redirect' middleware, as it still calls the storage driver URLFor.
For example, with Azure storage provider, this allows to transform the SAS Azure Blob Storage URL into the URL compatible with Azure Front Door.