mirror of
https://github.com/boringproxy/boringproxy.git
synced 2025-02-25 18:55:29 -06:00
Add logo for favicon
This commit is contained in:
parent
afd58db9b7
commit
f9f2155ab1
@ -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 {
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<title>boringproxy</title>
|
||||
|
||||
<link rel="icon" href="data:image/gif;base64,R0lGODlhEAAQAAAAACwAAAAAAQABAAACASgAOw==">
|
||||
<link rel="icon" href="/logo.png">
|
||||
|
||||
<style>
|
||||
{{.Styles}}
|
||||
|
Loading…
Reference in New Issue
Block a user