diff --git a/main.go b/main.go index df48819..979909a 100644 --- a/main.go +++ b/main.go @@ -822,11 +822,11 @@ func main() { http.Handle("/auth/", &authHandler{}) http.HandleFunc("/links.json", func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") - http.ServeFile(w, r, LinksFile) + http.ServeFile(w, r, filepath.Join(mp.(*FilePages).dirname, LinksFile)) }) http.HandleFunc("/documents.json", func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") - http.ServeFile(w, r, DocumentsFile) + http.ServeFile(w, r, filepath.Join(mp.(*FilePages).dirname, DocumentsFile)) }) http.HandleFunc("/fetchLink", func(w http.ResponseWriter, r *http.Request) { link := r.URL.Query().Get("url")