diff --git a/lib/trantor.go b/lib/trantor.go index 9ae5277..1bbf4a1 100644 --- a/lib/trantor.go +++ b/lib/trantor.go @@ -150,8 +150,9 @@ func InitRouter(db database.DB, sg *StatsGatherer, assetsPath string) { r.HandleFunc("/", sg.Gather(indexHandler)) for _, file := range []string{"robots.txt", "description.json", "opensearch.xml", "key.asc"} { + path := path.Join(assetsPath, file) serveFunc := func(w http.ResponseWriter, r *http.Request) { - http.ServeFile(w, r, path.Join(assetsPath, file)) + http.ServeFile(w, r, path) } r.HandleFunc("/"+file, serveFunc) }