diff --git a/routes/login_page.go b/routes/login_page.go index 2102c60..b3368e2 100644 --- a/routes/login_page.go +++ b/routes/login_page.go @@ -86,8 +86,9 @@ func authedPageMiddleware( ) http.Handler { returnNoAccess := func(w http.ResponseWriter, r *http.Request) { log.Printf("auth middle > restricting access to %s", r.URL.Path) - w.Header().Add("HX-Replace-Url", loginPath) - renderLoginPage(w, "") + w.Header().Add("HX-Redirect", "/") + // TODO i suppose i could add error? + return } rerturnSuccess := func(w http.ResponseWriter, r *http.Request, session sessions.SessionData) { ctx := context.WithValue(r.Context(), contextKey("session"), session) diff --git a/routes/templates/base.gohtml b/routes/templates/base.gohtml index 934f170..e81462f 100644 --- a/routes/templates/base.gohtml +++ b/routes/templates/base.gohtml @@ -22,16 +22,11 @@ -
- + +