From 93e3e847f2b52f295c91a45968924eb17a75f5fc Mon Sep 17 00:00:00 2001 From: Hoang Nguyen <50922013+catmandx@users.noreply.github.com> Date: Tue, 9 Nov 2021 17:06:19 +0700 Subject: [PATCH] Update helper.js (#66) --- custom/js/helper.js | 7 ++----- handler/routes.go | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/custom/js/helper.js b/custom/js/helper.js index feab9ac..c386ca0 100644 --- a/custom/js/helper.js +++ b/custom/js/helper.js @@ -27,11 +27,8 @@ function renderClientList(data) {
- - + Download diff --git a/handler/routes.go b/handler/routes.go index 8fcbab7..db837db 100644 --- a/handler/routes.go +++ b/handler/routes.go @@ -346,7 +346,7 @@ func DownloadClient(db store.IStore) echo.HandlerFunc { reader := strings.NewReader(config) // set response header for downloading - c.Response().Header().Set(echo.HeaderContentDisposition, "attachment; filename=wg0.conf") + c.Response().Header().Set(echo.HeaderContentDisposition, fmt.Sprintf("attachment; filename=%s.conf", clientData.Client.Name)) return c.Stream(http.StatusOK, "text/plain", reader) } }