Additional configuration env variables

WGUI_BRAND_TEXT - The brand text of the web application
WGUI_ACCENT_COLOR - The color of the interface sidebar
WGUI_LOGO_FILE_PATH - The file path of the website logo
WGUI_PAGE_TITLE_PREFIX - The HTML title prefix for all pages
This commit is contained in:
Ioannis Dressos 2023-10-22 14:29:26 +03:00 committed by GitHub
parent b55543f424
commit 956496d840
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 41 additions and 7 deletions

View file

@ -42,6 +42,15 @@ func Favicon() echo.HandlerFunc {
}
}
func Logo() echo.HandlerFunc {
return func(c echo.Context) error {
if logo, ok := os.LookupEnv(util.LogoFilePathEnvVar); ok {
return c.File(logo)
}
return c.Redirect(http.StatusFound, util.BasePath+"/static/custom/img/logo.png")
}
}
// LoginPage handler
func LoginPage() echo.HandlerFunc {
return func(c echo.Context) error {