re-add accidentally removed code for raw file view
lillian lillian@nowhere
Fri, 29 Mar 2024 21:04:05 -0400
1 files changed,
5 insertions(+),
0 deletions(-)
jump to
M
routes/routes.go
→
routes/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)