You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// In server.go, around line 213
http.HandleFunc("/logout", func(w http.ResponseWriter, r *http.Request) {
// Get the redirect_uri from query parameters
redirectUri := r.URL.Query().Get("redirect_uri")
// If redirect_uri is not provided, redirect to a default URL or handle it gracefully
if redirectUri == "" {
// Redirect to a default URL or return an informative response
// This can be any URL or a page showing that logout was successful
http.Redirect(w, r, "/default-logout-url", http.StatusFound)
return
}
// Your existing logout logic, which can include clearing session cookies, etc.
// Clear the session or cookies here, depending on your logic
// Example:
// http.SetCookie(w, &http.Cookie{
// Name: "auth_token",
// Value: "",
// MaxAge: -1,
// })
// After performing the logout logic, redirect to the provided redirect_uri
http.Redirect(w, r, redirectUri, http.StatusFound)
})
i think this should not return 401 so it wont interfere with the custom errors middleware (see #390)
https://github.com/thomseddon/traefik-forward-auth/blob/master/internal/server.go#L213
The text was updated successfully, but these errors were encountered: