mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-04-19 19:59:13 +03:00
Update routes.go (#475)
use config file download mime type "txt/conf" to prevent downloaded configs being saved as <filename>.txt, instead of wanted <filename>.conf. Tested on Android Firefox and Chrome
This commit is contained in:
parent
e2e1159ef4
commit
af7742bfb3
1 changed files with 1 additions and 1 deletions
|
@ -729,7 +729,7 @@ func DownloadClient(db store.IStore) echo.HandlerFunc {
|
|||
|
||||
// set response header for downloading
|
||||
c.Response().Header().Set(echo.HeaderContentDisposition, fmt.Sprintf("attachment; filename=%s.conf", clientData.Client.Name))
|
||||
return c.Stream(http.StatusOK, "text/plain", reader)
|
||||
return c.Stream(http.StatusOK, "text/conf", reader)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue