diff --git a/weed/server/master_server_handlers.go b/weed/server/master_server_handlers.go index dc3df2348..117423ec6 100644 --- a/weed/server/master_server_handlers.go +++ b/weed/server/master_server_handlers.go @@ -136,6 +136,9 @@ func (ms *MasterServer) dirAssignHandler(w http.ResponseWriter, r *http.Request) } func (ms *MasterServer) maybeAddJwtAuthorization(w http.ResponseWriter, fileId string, isWrite bool) { + if fileId == "" { + return + } var encodedJwt security.EncodedJwt if isWrite { encodedJwt = security.GenJwt(ms.guard.SigningKey, ms.guard.ExpiresAfterSec, fileId)