From 7e0d7a1625322cfcbe82ecebadbb31d63100a041 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 5 May 2025 20:36:12 +0200 Subject: [PATCH] bugfix variable lookup path --- handler.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/handler.go b/handler.go index c650ba4..4f0bff3 100644 --- a/handler.go +++ b/handler.go @@ -5,6 +5,7 @@ import ( "fmt" "net/http" "os" + "path" ) type handler struct { @@ -14,7 +15,8 @@ type handler struct { func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { reqPath := r.URL.Path - f, err := h.staticFS.Open(fmt.Sprintf("ng-client/browser%s", reqPath)) + lookupPath := path.Dir(h.indexPath) + f, err := h.staticFS.Open(fmt.Sprintf("%s%s", lookupPath, reqPath)) if f != nil { f.Close() }