From 4f167c0fa991aa9ddb3f0252e23694b3aa6532b1 Mon Sep 17 00:00:00 2001 From: Rutger Broekhoff Date: Sat, 30 Dec 2023 00:40:10 +0100 Subject: URL as string, lesson learned --- cmd/git-lfs-server/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd') diff --git a/cmd/git-lfs-server/main.go b/cmd/git-lfs-server/main.go index c3f4e91..5e99288 100644 --- a/cmd/git-lfs-server/main.go +++ b/cmd/git-lfs-server/main.go @@ -73,7 +73,7 @@ func (d SecondDuration) MarshalJSON() ([]byte, error) { } type batchAction struct { - HRef *url.URL `json:"href"` + HRef string `json:"href"` Header map[string]string `json:"header,omitempty"` ExpiresIn *SecondDuration `json:"expires_in,omitempty"` ExpiresAt *RFC3339SecondsTime `json:"expires_at,omitempty"` @@ -183,7 +183,7 @@ func (h *handler) handleDownloadObject(ctx context.Context, repo string, obj par Authenticated: &authenticated, Actions: map[operation]batchAction{ operationDownload: { - HRef: presigned, + HRef: presigned.String(), ExpiresIn: &expiresInSeconds, }, }, -- cgit v1.2.3