all repos — elgit @ 7bea4a8f49a9f3aa9386b7e7d24a2a78beb2f7e9

fork of legit: web frontend for git, written in go

embed static files

Alan Pearce
commit

7bea4a8f49a9f3aa9386b7e7d24a2a78beb2f7e9

parent

5ff42d78653ea018f8855de4768cf872ce41e41e

1 file changed, 0 insertions(+), 14 deletions(-)

changed files
M routes/routes.goroutes/routes.go
@@ -13,8 +13,6 @@
"alin.ovh/elgit/config" "alin.ovh/elgit/git" "alin.ovh/elgit/templates" - securejoin "github.com/cyphar/filepath-securejoin" - "github.com/dimfeld/httptreemux/v5" "github.com/microcosm-cc/bluemonday" "github.com/russross/blackfriday/v2" )
@@ -435,15 +433,3 @@ log.Println(err)
return } } - -func (d *deps) ServeStatic(w http.ResponseWriter, r *http.Request, params map[string]string) { - f := params["file"] - f = httptreemux.Clean(f) - f, err := securejoin.SecureJoin(d.c.Dirs.Static, f) - if err != nil { - d.Write404(w) - return - } - - http.ServeFile(w, r, f) -}