all repos — legit @ a13ced49e12440e25a4553fd897ca0d009bad11e

web frontend for git

re-add accidentally removed code for raw file view
lillian lillian@nowhere
Fri, 29 Mar 2024 21:04:05 -0400
commit

a13ced49e12440e25a4553fd897ca0d009bad11e

parent

892ba7e5f3dbaf79b12a457f9ee6191df56625a3

1 files changed, 5 insertions(+), 0 deletions(-)

jump to
M routes/routes.goroutes/routes.go

@@ -199,6 +199,11 @@ return

} func (d *deps) FileContent(w http.ResponseWriter, r *http.Request) { + var raw bool + if rawParam, err := strconv.ParseBool(r.URL.Query().Get("raw")); err == nil { + raw = rawParam + } + name := r.PathValue("name") if d.isIgnored(name) { d.Write404(w)