summaryrefslogtreecommitdiff
path: root/internal/api/client/fileserver/fileserver.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-07-30 14:42:47 +0200
committerLibravatar GitHub <noreply@github.com>2022-07-30 13:42:47 +0100
commit8fdc9ed5528fb99949fbe8851065ca3d59cc1ac3 (patch)
treed4bc553b0f730717262c2ddf2d0e1e3ce61d75f2 /internal/api/client/fileserver/fileserver.go
parent[frontend] Update client list and apply some minor fixes (#734) (diff)
downloadgotosocial-8fdc9ed5528fb99949fbe8851065ca3d59cc1ac3.tar.xz
serve HEAD requests via the fileserver (#735)
Diffstat (limited to 'internal/api/client/fileserver/fileserver.go')
-rw-r--r--internal/api/client/fileserver/fileserver.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/api/client/fileserver/fileserver.go b/internal/api/client/fileserver/fileserver.go
index 1a140e86d..dcb54f986 100644
--- a/internal/api/client/fileserver/fileserver.go
+++ b/internal/api/client/fileserver/fileserver.go
@@ -59,5 +59,6 @@ func (m *FileServer) Route(s router.Router) error {
// something like "/fileserver/:account_id/:media_type/:media_size/:file_name"
fileServePath := fmt.Sprintf("%s/:%s/:%s/:%s/:%s", FileServeBasePath, AccountIDKey, MediaTypeKey, MediaSizeKey, FileNameKey)
s.AttachHandler(http.MethodGet, fileServePath, m.ServeFile)
+ s.AttachHandler(http.MethodHead, fileServePath, m.ServeFile)
return nil
}