bugfix variable lookup path
This commit is contained in:
parent
45629a7bff
commit
7e0d7a1625
@ -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()
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user