|
@ -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) { |
|
|
func (ms *MasterServer) maybeAddJwtAuthorization(w http.ResponseWriter, fileId string, isWrite bool) { |
|
|
|
|
|
if fileId == "" { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
var encodedJwt security.EncodedJwt |
|
|
var encodedJwt security.EncodedJwt |
|
|
if isWrite { |
|
|
if isWrite { |
|
|
encodedJwt = security.GenJwt(ms.guard.SigningKey, ms.guard.ExpiresAfterSec, fileId) |
|
|
encodedJwt = security.GenJwt(ms.guard.SigningKey, ms.guard.ExpiresAfterSec, fileId) |
|
|