From 3efcd1574785c03880ad1984cdd211ed029d950e Mon Sep 17 00:00:00 2001 From: Umputun Date: Tue, 1 Jun 2021 03:25:35 -0500 Subject: [PATCH] add warns on static path issues --- app/proxy/proxy.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/proxy/proxy.go b/app/proxy/proxy.go index ea9b2f5..6f20662 100644 --- a/app/proxy/proxy.go +++ b/app/proxy/proxy.go @@ -235,11 +235,13 @@ func (h *Http) proxyHandler() http.HandlerFunc { // static match result has webroot:location, i.e. /www:/var/somedir/ ae := strings.Split(match.Destination, ":") if len(ae) != 2 { // shouldn't happen + log.Printf("[WARN] unexpected static assets destination: %s", match.Destination) h.Reporter.Report(w, http.StatusInternalServerError) return } fs, err := R.FileServer(ae[0], ae[1]) if err != nil { + log.Printf("[WARN] file server error, %v", err) h.Reporter.Report(w, http.StatusInternalServerError) return }