From 1810f4a93e779c05e56704d7f0a1690319e5ded3 Mon Sep 17 00:00:00 2001 From: masl Date: Sun, 5 Nov 2023 23:05:29 +0100 Subject: [PATCH] feat: add a favicon --- static/favicon.ico | Bin 0 -> 4286 bytes web/router.go | 5 +++++ 2 files changed, 5 insertions(+) create mode 100644 static/favicon.ico diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..49e48914fc3cd6e506701b9ac230ca8b82c6990e GIT binary patch literal 4286 zcmeHLNod?v9Da$~f+(%16`|7J^d^D`LO~CLUOak|D(GGCWD#*Ar3gKVQc!3qxFoh| zOwy)lGFc~?%s!LZGn33rmdQ4m%)Vxl=l8vt*DSQ5)r*Ht`Q^R;+rHoO{eJIJAzJY7 z^l8DrqW!oKCxj5MKrkfUhHzZ{F!$*9$OHe?1JkAf;V}&gr?F229OJ@o8x>ybkWk}O zgTe!0f12&ofbg1!gwHa3D6D(3U)V;vg=4H&*hhPX17aWTQDe3dw8MW3v!PR%?))Vt zZ?}ud{thLB*MAiqm%bOraQb}6-4b*fTm80?$AC#`4Y`ahR_vwle9Q?K^xpe(P23g@ z{2pN+>3I_PZ$ghxp~E@!zr$FYZMgfqb*SsSW#~p5^k_2=c3yy7v>0yui1AC1Um#b2 z^E-5H$NCQF{U>a=47mX853Ix8FVY6B4|ULf#Cqu0^9FFcpkKy4(Jv`3Eyml@F@8&8 zUP7mapzj#Fsl?tK=RC)pSnI+b*ro*EHR$04_F2nN*AviHP^6UF@9!XXDH-;dmCT^8$08n!ob_7etj{JRXt{=SdS35|cr7y0oa32@2lXmJhp#P$&Lh_0 zF2wsLk1#(Ux33hJ~OS(Ur)qkYIRYj zlPfa4v8vk5^<_!nSSGb5vztko%WObWGM7#^zSH!V*C_*ZlEuzZ)$A`dso%j#e7DVi+Lrbd{*+in9ImgAtx)Pf~;0bvR19A zwo)!i3fFU<>k8RTr4Mc3xwMOZj0T<3YZZ^`ZLx@1dH>uOc3Dc{wFI_Kdd`i#Dy4vTXE8FWpM+ZTcV zlHWcSWW3WGD+-&o)o_kJUtw(Fe2fue?|1{huJpL83)XNgeM6s=3fWy9R+m(a!{D&n zH1IR>{$(V@@5leU)-attb9o;XdkEt3n6(lzbpQ za|QXljv9RiJP_dD>&V>%bBgvi>^XoBeQ1Z`J$POOAIURvg=3{c9#{wWH2gpxl!2em zrsO6#urTYF0sHu6L0w1c_pkKv#LRJ9`!3+GM;d%I8 zIB?&v)xYqxNi46Q?)keqk&amj%=nx9N@t z_4Xw2)muTm8SG;kdS6Sw#DY%x;~ejT6!Mkl-NgVdzjb|RaIT>j@pVqnXN(8yEo$wR z-m4c|QEx@aHMtM(;0Ji2-!ISMKDx$QNjpl#9C%cOKhn)SE$ni%Sqm5+jn6pH|A=J{ z`0w(4F*R`QAlyB_`F>J)IW@>weFZ--7V+frd~jjbmu8+SPB0GS0YuwQuJf)S*B9sf z61D9o-1A3>@3kKO2GhzgCsC7>4vAQV{b%qNIE_2%1jwO$|pz%Acue&`Xz8xwB{0eq27C#lyN`1RI8#8;v($Pwm0{mt5j zyKEWrZHVQw+KvYXJ!B!d;esDk?i%}^_Sr_>1E(+GEz~*dxA#K7tHAvnx%2Ayt>0RG z;4;^Sz2-wseYmNBV+`+Ua1_Ek!ksBby01QN?EB+L_mv-7k>}v}gutDO{JwXNJsjfw zSJO7XZ4CKhP;Y(sLxhpzA*b>Fn;y;luRMVF|Gr;Fh-0JpFN1IYg_hhiioH1FD9@o( UggCVWk#X^s%!qGfy=5QXKc5Y~761SM literal 0 HcmV?d00001 diff --git a/web/router.go b/web/router.go index fdc6956..ff2135c 100644 --- a/web/router.go +++ b/web/router.go @@ -27,6 +27,11 @@ func GetRouter(store storage.Store, htmlTemplates *template.Template, staticFS f // static files router.Handler("GET", "/static/*filepath", http.FileServer(http.FS(staticFS))) + // redirect /favicon.ico to /static/favicon.ico + router.GET("/favicon.ico", func(w http.ResponseWriter, r *http.Request, p httprouter.Params) { + http.Redirect(w, r, "/static/favicon.ico", http.StatusMovedPermanently) + }) + // api endpoints router.POST("/api/ping", ping.Handle())