From cdc6630a79362b524ee75d6fffba9dcccb35814f Mon Sep 17 00:00:00 2001 From: Wikid82 Date: Fri, 21 Nov 2025 20:57:41 -0500 Subject: [PATCH] feat: add Content-Disposition header for file downloads in backup and logs handlers --- backend/internal/api/handlers/backup_handler.go | 1 + backend/internal/api/handlers/logs_handler.go | 1 + 2 files changed, 2 insertions(+) diff --git a/backend/internal/api/handlers/backup_handler.go b/backend/internal/api/handlers/backup_handler.go index 31aa7b51..73f62719 100644 --- a/backend/internal/api/handlers/backup_handler.go +++ b/backend/internal/api/handlers/backup_handler.go @@ -60,6 +60,7 @@ func (h *BackupHandler) Download(c *gin.Context) { return } + c.Header("Content-Disposition", "attachment; filename="+filename) c.File(path) } diff --git a/backend/internal/api/handlers/logs_handler.go b/backend/internal/api/handlers/logs_handler.go index 93806d41..d23dcc5a 100644 --- a/backend/internal/api/handlers/logs_handler.go +++ b/backend/internal/api/handlers/logs_handler.go @@ -74,5 +74,6 @@ func (h *LogsHandler) Download(c *gin.Context) { return } + c.Header("Content-Disposition", "attachment; filename="+filename) c.File(path) }