mirror of
https://github.com/distribution/distribution.git
synced 2025-09-02 07:25:25 +00:00
disable schema1 by default, add a config flag to enable it
port of #2473 Signed-off-by: Viktor Stanchev <me@viktorstanchev.com>
This commit is contained in:
@@ -174,6 +174,10 @@ func NewApp(ctx context.Context, config *configuration.Configuration) *App {
|
||||
|
||||
options = append(options, storage.Schema1SigningKey(app.trustKey))
|
||||
|
||||
if config.Compatibility.Schema1.Enabled {
|
||||
options = append(options, storage.EnableSchema1)
|
||||
}
|
||||
|
||||
if config.HTTP.Host != "" {
|
||||
u, err := url.Parse(config.HTTP.Host)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user