Added configuration from environment variables

This commit is contained in:
2025-02-08 16:27:33 +11:00
parent 1004dc9563
commit a842d09f96
7 changed files with 48 additions and 19 deletions

View File

@@ -65,10 +65,10 @@ func HandleLoginRequest() http.Handler {
)
}
func HandleLoginPage() http.Handler {
func HandleLoginPage(trustedHost string) http.Handler {
return http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
cookies.SetPageFrom(w, r)
cookies.SetPageFrom(w, r, trustedHost)
page.Login().Render(r.Context(), w)
},
)