commit 31e0e178e8cbb9f4d0997dd09abe7766221967da
parent 0bda270eb42f70ab543082b3c9871c5ecd86bc02
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date: Tue, 29 Apr 2025 10:51:28 +0200
load statis html files from correct folder
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile.in b/Makefile.in
@@ -43,4 +43,4 @@ gana:
dist:
git archive --format=tar.gz -o taldir-${GITVER}.tar.gz --prefix=taldir-${GITVER}/ HEAD
-.PHONY: all gana server cli check format uninstall install
+.PHONY: all gana server cli check format uninstall install dist
diff --git a/pkg/rest/taldir.go b/pkg/rest/taldir.go
@@ -912,9 +912,9 @@ func (t *Taldir) setupHandlers() {
t.Router.HandleFunc("/config", t.configResponse).Methods("GET")
/* Assets HTML */
- t.Router.PathPrefix("/css").Handler(http.StripPrefix("/css", http.FileServer(http.Dir("./static/css"))))
- t.Router.PathPrefix("/images").Handler(http.StripPrefix("/images", http.FileServer(http.Dir("./static/images"))))
- t.Router.PathPrefix("/fontawesome").Handler(http.StripPrefix("/fontawesome", http.FileServer(http.Dir("./static/fontawesome"))))
+ t.Router.PathPrefix("/css").Handler(http.StripPrefix("/css", http.FileServer(http.Dir(t.getFileName("static/css")))))
+ t.Router.PathPrefix("/images").Handler(http.StripPrefix("/images", http.FileServer(http.Dir(t.getFileName("static/images")))))
+ t.Router.PathPrefix("/fontawesome").Handler(http.StripPrefix("/fontawesome", http.FileServer(http.Dir(t.getFileName("static/fontawesome")))))
/* Registration API */
t.Router.HandleFunc("/", t.landingPage).Methods("GET")