fix: logout inserting html into page
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user