diff --git a/ui_handler.go b/ui_handler.go index aa26178..89fed14 100644 --- a/ui_handler.go +++ b/ui_handler.go @@ -194,6 +194,20 @@ func (h *WebUiHandler) handleWebUiRequest(w http.ResponseWriter, r *http.Request h.alertDialog(w, r, "Not authorized", "/#/tunnels") return } + case "/logo.png": + + logoPngBytes, err := box.Bytes("logo.png") + if err != nil { + w.WriteHeader(500) + h.alertDialog(w, r, err.Error(), homePath) + return + } + + w.Header()["Content-Type"] = []string{"image/png"} + w.Header()["Cache-Control"] = []string{"max-age=86400"} + + w.Write(logoPngBytes) + case "/": indexTmplStr, err := h.box.String("index.tmpl") if err != nil { diff --git a/webui/head.tmpl b/webui/head.tmpl index 340d888..6038df3 100644 --- a/webui/head.tmpl +++ b/webui/head.tmpl @@ -3,7 +3,7 @@ boringproxy - +