Update helper.js (#66)

This commit is contained in:
Hoang Nguyen 2021-11-09 17:06:19 +07:00 committed by GitHub
parent 4093722926
commit 93e3e847f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View file

@ -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)
}
}