Skip to content

Commit

Permalink
Update routes.go (#475)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
MiguSchweiz authored Dec 25, 2023
1 parent e2e1159 commit af7742b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handler/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit af7742b

Please sign in to comment.