Update routes.go

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:
Michael Walter 2023-10-25 15:02:51 +02:00 committed by MiguSchweiz
parent b55543f424
commit 76cfa2d89a

View file

@ -689,7 +689,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)
}
}