1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

chore: ability to disable home page (resolve #460)

This commit is contained in:
Ferdinand Mütsch
2023-03-04 09:33:36 +01:00
parent b1dff58025
commit ce077f2efc
4 changed files with 10 additions and 3 deletions

View File

@@ -46,6 +46,10 @@ func (h *HomeHandler) GetIndex(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, fmt.Sprintf("%s/summary", h.config.Server.BasePath), http.StatusFound)
return
}
if h.config.Security.DisableFrontpage {
http.Redirect(w, r, fmt.Sprintf("%s/login", h.config.Server.BasePath), http.StatusFound)
return
}
templates[conf.IndexTemplate].Execute(w, h.buildViewModel(r, w))
}