Skip to content

Conversation

smira
Copy link
Contributor

@smira smira commented Oct 31, 2023

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.

Copy link
Member

@milosgajdos milosgajdos left a 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

@milosgajdos
Copy link
Member

ping @thaJeztah @Jamstah

@milosgajdos milosgajdos requested a review from corhere December 18, 2023 11:02
@milosgajdos
Copy link
Member

@corhere mind having a look at this? Thanks 🙇

@milosgajdos milosgajdos requested a review from squizzi May 4, 2024 14:36
@milosgajdos
Copy link
Member

Ping @thaJeztah @squizzi

Copy link
Collaborator

@davidspek davidspek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@milosgajdos
Copy link
Member

@smira mind adding some basics docs in, please?

@smira smira force-pushed the feat/rewrite-middleware branch from 24ad324 to 97f8d92 Compare July 4, 2024 13:45
@smira
Copy link
Contributor Author

smira commented Jul 4, 2024

@smira mind adding some basics docs in, please?

done, rebased, adapted to the changes

Copy link
Member

@milosgajdos milosgajdos left a 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>
@smira smira force-pushed the feat/rewrite-middleware branch from 97f8d92 to 558ace1 Compare July 4, 2024 14:49
@milosgajdos milosgajdos merged commit 4dd0ac9 into distribution:main Jul 4, 2024
milosgajdos added a commit to milosgajdos/distribution that referenced this pull request Aug 15, 2024
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants