Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

fix(server): align public-memory download route and cache bypass

AmanRajSinghMouryad597627b91a1
diff --git a/server/cmd/museum/main.go b/server/cmd/museum/main.go
index 8901c40170..a0e35d5b72 100644
--- a/server/cmd/museum/main.go
+++ b/server/cmd/museum/main.go
@@ -772,7 +772,7 @@ func main() {
publicMemoryAPI.GET("/info", publicMemoryShareHandler.GetInfo)
publicMemoryAPI.GET("/files", publicMemoryShareHandler.GetFiles)
publicMemoryAPI.GET("/files/preview/:fileID", publicMemoryShareHandler.GetThumbnail)
- publicMemoryAPI.GET("/files/:fileID", publicMemoryShareHandler.GetFile)
+ publicMemoryAPI.GET("/files/download/:fileID", publicMemoryShareHandler.GetFile)
publicMemoryAPI.GET("/file-data", publicMemoryShareHandler.GetFileData)
publicMemoryAPI.GET("/files/data/preview", publicMemoryShareHandler.GetPreviewURL)
@@ -1275,7 +1275,7 @@ func cacheHeaders() gin.HandlerFunc {
strings.HasPrefix(reqPath, "/public-collection/files/preview/") ||
strings.HasPrefix(reqPath, "/public-collection/files/download/") ||
strings.HasPrefix(reqPath, "/public-memory/files/preview/") ||
- strings.HasPrefix(reqPath, "/public-memory/files/") ||
+ strings.HasPrefix(reqPath, "/public-memory/files/download/") ||
strings.HasPrefix(reqPath, "/cast/files/preview/") ||
strings.HasPrefix(reqPath, "/cast/files/download/") {
// Exclude those that redirect to S3 for file downloads.