diff options
Diffstat (limited to 'routes')
-rw-r--r-- | routes/routes.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/routes/routes.go b/routes/routes.go index 18e3689..e22c7f9 100644 --- a/routes/routes.go +++ b/routes/routes.go @@ -199,6 +199,11 @@ func (d *deps) RepoTree(w http.ResponseWriter, r *http.Request) { } 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) |