diff --git a/make/common/templates/nginx/nginx.http.conf b/make/common/templates/nginx/nginx.http.conf index 4eec656c3..980d9ece2 100644 --- a/make/common/templates/nginx/nginx.http.conf +++ b/make/common/templates/nginx/nginx.http.conf @@ -70,6 +70,10 @@ http { proxy_buffering off; proxy_request_buffering off; + } + + location /service/notifications { + return 404; } } } diff --git a/make/common/templates/nginx/nginx.https.conf b/make/common/templates/nginx/nginx.https.conf index c90e951c8..05ede9a5d 100644 --- a/make/common/templates/nginx/nginx.https.conf +++ b/make/common/templates/nginx/nginx.https.conf @@ -87,6 +87,10 @@ http { proxy_buffering off; proxy_request_buffering off; + } + + location /service/notifications { + return 404; } } server { diff --git a/src/ui/api/repository.go b/src/ui/api/repository.go index 3a885de8b..4db0d1eb1 100644 --- a/src/ui/api/repository.go +++ b/src/ui/api/repository.go @@ -164,15 +164,15 @@ func (ra *RepositoryAPI) Delete() { } for _, t := range tags { - if err := rc.DeleteTag(t); err != nil { + if err = rc.DeleteTag(t); err != nil { if regErr, ok := err.(*registry_error.Error); ok { - if regErr.StatusCode != http.StatusNotFound { - ra.CustomAbort(regErr.StatusCode, regErr.Detail) + if regErr.StatusCode == http.StatusNotFound { + continue } - } else { - log.Errorf("error occurred while deleting tag %s:%s: %v", repoName, t, err) - ra.CustomAbort(http.StatusInternalServerError, "internal error") + ra.CustomAbort(regErr.StatusCode, regErr.Detail) } + log.Errorf("error occurred while deleting tag %s:%s: %v", repoName, t, err) + ra.CustomAbort(http.StatusInternalServerError, "internal error") } log.Infof("delete tag: %s:%s", repoName, t) go TriggerReplicationByRepository(repoName, []string{t}, models.RepOpDelete)