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:
Michael Walter 2023-12-25 20:22:42 +01:00 committed by GitHub
parent e2e1159ef4
commit af7742bfb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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