diff options
Diffstat (limited to 'cmd/git-lfs-server')
-rw-r--r-- | cmd/git-lfs-server/main.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/git-lfs-server/main.go b/cmd/git-lfs-server/main.go index cfad3e0..eec7d00 100644 --- a/cmd/git-lfs-server/main.go +++ b/cmd/git-lfs-server/main.go | |||
@@ -150,7 +150,6 @@ func sha256AsBase64(hash string) string { | |||
150 | 150 | ||
151 | func (h *handler) handleDownloadObject(ctx context.Context, repo string, obj parsedBatchObject) batchResponseObject { | 151 | func (h *handler) handleDownloadObject(ctx context.Context, repo string, obj parsedBatchObject) batchResponseObject { |
152 | fullPath := path.Join(repo+".git", "lfs/objects", obj.firstByte, obj.secondByte, obj.fullHash) | 152 | fullPath := path.Join(repo+".git", "lfs/objects", obj.firstByte, obj.secondByte, obj.fullHash) |
153 | expiresIn := time.Hour * 24 | ||
154 | 153 | ||
155 | info, err := h.mc.StatObject(ctx, h.bucket, fullPath, minio.StatObjectOptions{Checksum: true}) | 154 | info, err := h.mc.StatObject(ctx, h.bucket, fullPath, minio.StatObjectOptions{Checksum: true}) |
156 | if err != nil { | 155 | if err != nil { |
@@ -170,6 +169,7 @@ func (h *handler) handleDownloadObject(ctx context.Context, repo string, obj par | |||
170 | return makeObjError(obj, "Incorrect size specified for object or object currupted", http.StatusUnprocessableEntity) | 169 | return makeObjError(obj, "Incorrect size specified for object or object currupted", http.StatusUnprocessableEntity) |
171 | } | 170 | } |
172 | 171 | ||
172 | expiresIn := time.Minute * 10 | ||
173 | claims := handleObjectCustomClaims{ | 173 | claims := handleObjectCustomClaims{ |
174 | Gitolfs3: handleObjectGitolfs3Claims{ | 174 | Gitolfs3: handleObjectGitolfs3Claims{ |
175 | Type: "basic-transfer", | 175 | Type: "basic-transfer", |
@@ -242,7 +242,7 @@ func (h *handler) handleUploadObject(ctx context.Context, repo string, obj parse | |||
242 | return &objErr | 242 | return &objErr |
243 | } | 243 | } |
244 | 244 | ||
245 | expiresIn := time.Hour * 24 | 245 | expiresIn := time.Minute * 10 |
246 | claims := handleObjectCustomClaims{ | 246 | claims := handleObjectCustomClaims{ |
247 | Gitolfs3: handleObjectGitolfs3Claims{ | 247 | Gitolfs3: handleObjectGitolfs3Claims{ |
248 | Type: "basic-transfer", | 248 | Type: "basic-transfer", |