feat - Allow to overwrite login template

This commit is contained in:
2023-06-22 07:01:29 +02:00
parent fc33bfb47b
commit eb867528e3
2 changed files with 15 additions and 0 deletions

View File

@@ -325,6 +325,13 @@ func main() {
if config.Keys.EmbedStaticFiles {
r.PathPrefix("/").Handler(web.ServeFiles())
if i, err := os.Stat("./var/img"); err == nil {
if i.IsDir() {
log.Info("Use local directory for static images")
r.Handle("/img", http.FileServer(http.Dir("./var/img")))
}
}
} else {
r.PathPrefix("/").Handler(http.FileServer(http.Dir(config.Keys.StaticFiles)))
}