mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-04-21 20:12:33 +03:00
Update routes.go
Download client's config file with the client name as the file name instead of "wg0.conf"
This commit is contained in:
parent
f2b7b3a83a
commit
756db05c7c
1 changed files with 1 additions and 1 deletions
|
@ -346,7 +346,7 @@ func DownloadClient() 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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue