Skip to content

Commit

Permalink
fix: pass signature and expiration through thumbnailer
Browse files Browse the repository at this point in the history
Signed-off-by: jkoberg <jkoberg@owncloud.com>
  • Loading branch information
kobergj committed Mar 11, 2024
1 parent 2c735af commit a3044d1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion services/thumbnails/pkg/service/grpc/v0/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,14 @@ func (g Thumbnail) handleWebdavSource(ctx context.Context, req *thumbnailssvc.Ge
if src.WebdavAuthorization != "" {
ctx = imgsource.ContextSetAuthorization(ctx, src.WebdavAuthorization)
}
imgURL.RawQuery = ""

// add signature and expiration to webdav url
signature, expiration := imgURL.Query().Get("signature"), imgURL.Query().Get("expiration")
params := url.Values{}
params.Add("signature", signature)
params.Add("expiration", expiration)
imgURL.RawQuery = params.Encode()

r, err := g.webdavSource.Get(ctx, imgURL.String())
if err != nil {
return "", merrors.InternalServerError(g.serviceID, "could not get image from source: %s", err.Error())
Expand Down

0 comments on commit a3044d1

Please sign in to comment.