Skip to content

Commit

Permalink
Merge pull request #4566 from kobergj/FixPubLinkPreviews
Browse files Browse the repository at this point in the history
Fix public link previews
  • Loading branch information
kobergj committed Mar 8, 2024
2 parents 3b519e2 + b82840f commit fc2867f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog/unreleased/fix-publiclink-previews.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Fix public link previews

Fixes previews for public links

https://github.com/cs3org/reva/pull/4566
2 changes: 1 addition & 1 deletion internal/http/services/owncloud/ocdav/dav.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func (h *DavHandler) Handler(s *svc) http.Handler {
sig := q.Get("signature")
expiration := q.Get("expiration")
// We restrict the pre-signed urls to downloads.
if sig != "" && expiration != "" && r.Method != http.MethodGet {
if sig != "" && expiration != "" && !(r.Method == http.MethodGet || r.Method == http.MethodHead) {
w.WriteHeader(http.StatusUnauthorized)
return
}
Expand Down

0 comments on commit fc2867f

Please sign in to comment.