fragmenta / fragmenta-cms

A user-friendly CMS written in Go (golang)
http://fragmenta.eu
MIT License
586 stars 70 forks source link

Added GET route for users/logout #21

Closed chriseaton closed 8 years ago

chriseaton commented 8 years ago

Fixed issue where the "logout" link fails to redirect because the GET method route for users/logout doesn't exist.

kennygrant commented 8 years ago

Destructive links like logout should never be GET. This is POST intentionally. I suspect you have js disabled and therefore the link isn't working for you? Please open an issue if you think this is a problem, but the solution is not to make a GET route for a non-idempotent request.

chriseaton commented 8 years ago

Hmm, why rely on JS to do something special instead of updating the logout action to be idempotent? I think it would be as simple as wrapping the session clear with an if (isAuthenticated) { or something.

kennygrant commented 8 years ago

I'll put discussion of whether it is a good idea over on the issue.