mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-05-24 00:24:06 +03:00
Add favicon (#288)
This commit is contained in:
parent
ccffe4028a
commit
a866977cb0
7 changed files with 17 additions and 0 deletions
|
@ -6,6 +6,7 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
|
@ -32,6 +33,15 @@ func Health() echo.HandlerFunc {
|
|||
}
|
||||
}
|
||||
|
||||
func Favicon() echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
if favicon, ok := os.LookupEnv(util.FaviconFilePathEnvVar); ok {
|
||||
return c.File(favicon)
|
||||
}
|
||||
return c.Redirect(http.StatusFound, util.BasePath+"/static/custom/img/favicon.ico")
|
||||
}
|
||||
}
|
||||
|
||||
// LoginPage handler
|
||||
func LoginPage() echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue