embed static files
1 file changed, 0 insertions(+), 14 deletions(-)
changed files
M routes/routes.go → routes/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) -}