Add option to disable integrity check on upload

This commit is contained in:
Michael Eischer 2021-08-09 15:40:50 +02:00 committed by Alexander Neumann
parent 54adcb1fc7
commit 16889717c6
3 changed files with 26 additions and 14 deletions

View file

@ -29,6 +29,7 @@ type Server struct {
Debug bool
MaxRepoSize int64
PanicOnError bool
NoVerifyUpload bool
htpasswdFile *HtpasswdFile
quotaManager *quota.Manager
@ -84,10 +85,11 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// Pass the request to the repo.Handler
opt := repo.Options{
AppendOnly: s.AppendOnly,
Debug: s.Debug,
QuotaManager: s.quotaManager, // may be nil
PanicOnError: s.PanicOnError,
AppendOnly: s.AppendOnly,
Debug: s.Debug,
QuotaManager: s.quotaManager, // may be nil
PanicOnError: s.PanicOnError,
NoVerifyUpload: s.NoVerifyUpload,
}
if s.Prometheus {
opt.BlobMetricFunc = makeBlobMetricFunc(username, folderPath)