fix: no need to proxy if IAM not initialized (#12416)

IAM not initialized doesn't mean we can't still
read the content from the disk, we should just
allow the request to go-through if object layer
is initialized.
This commit is contained in:
Harshavardhana 2021-06-01 12:23:13 -07:00 committed by GitHub
parent 7148c2490a
commit bf87c4b1e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -166,10 +166,7 @@ func setBrowserRedirectHandler(h http.Handler) http.Handler {
}
func shouldProxy() bool {
if newObjectLayerFn() == nil {
return true
}
return !globalIAMSys.Initialized()
return newObjectLayerFn() == nil
}
// Fetch redirect location if urlPath satisfies certain

View File

@ -60,8 +60,8 @@ func (m *metacacheManager) initManager() {
time.Sleep(time.Second)
objAPI = newObjectLayerFn()
}
if !globalIsErasure {
logger.Info("metacacheManager was initialized in non-erasure mode, skipping save")
return
}