mirror of
https://github.com/distribution/distribution
synced 2024-11-12 05:45:51 +01:00
558ace1391
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>
28 lines
1.2 KiB
Go
28 lines
1.2 KiB
Go
package main
|
|
|
|
import (
|
|
_ "net/http/pprof"
|
|
|
|
"github.com/distribution/distribution/v3/registry"
|
|
_ "github.com/distribution/distribution/v3/registry/auth/htpasswd"
|
|
_ "github.com/distribution/distribution/v3/registry/auth/silly"
|
|
_ "github.com/distribution/distribution/v3/registry/auth/token"
|
|
_ "github.com/distribution/distribution/v3/registry/proxy"
|
|
_ "github.com/distribution/distribution/v3/registry/storage/driver/azure"
|
|
_ "github.com/distribution/distribution/v3/registry/storage/driver/filesystem"
|
|
_ "github.com/distribution/distribution/v3/registry/storage/driver/gcs"
|
|
_ "github.com/distribution/distribution/v3/registry/storage/driver/inmemory"
|
|
_ "github.com/distribution/distribution/v3/registry/storage/driver/middleware/cloudfront"
|
|
_ "github.com/distribution/distribution/v3/registry/storage/driver/middleware/redirect"
|
|
_ "github.com/distribution/distribution/v3/registry/storage/driver/middleware/rewrite"
|
|
_ "github.com/distribution/distribution/v3/registry/storage/driver/s3-aws"
|
|
)
|
|
|
|
func main() {
|
|
// NOTE(milosgajdos): if the only two commands registered
|
|
// with registry.RootCmd fail they will halt the program
|
|
// execution and exit the program with non-zero exit code.
|
|
// nolint:errcheck
|
|
registry.RootCmd.Execute()
|
|
}
|