rDrama/files/routes
painejohn 0e165e17c0 Fixes #110 "Signout doesn't always work"
I tried reproducing the issues from #110 but without luck. The
workflow looks a little like this:

- User changes their avatar.
    - This triggers a POST request to the profile endpoint.
- User clicks "Log out" from the dropdown menu"
    - This triggers the post_toast function in js that makes a POST to
      /logout, which clears the user's session. Then, on receipt of the
      response, the js calls `location.reload`, which replays the
      browser's last action, which in our case is the earlier POST
      request to the profile endpoint. This is why the browser asks
      whether it's OK to resubmit the data _again_. Agreeing resubmits
      the first POST request.
    - After `location.reload`, since the user is no longer logged in,
      they either get a 405 (from the profile edit page) or a 500 (from
      the profile overview page).

This PR then changes the `/logout` endpoint from POST to GET, then
updates the header template to change the "Log out" anchor to simply
link to "/logout" instead of calling any js.

Reasoning behind it:
- logout doesn't modify server-side resources, so it's safe to make it a
  GET request.
- Making it a GET prevents the browser from ever displaying the "data
  resubmit" warning window.
- The "/logout" endpoint can now simply redirect to the homepage.
2022-07-29 06:47:19 -05:00
..
__init__.py Add trailing LF to text files 2022-05-10 21:05:51 -04:00
admin.py Support settings for integers and allow setting filter settings in UI 2022-07-09 06:33:41 -05:00
awards.py Remove some gimmicky r/drama features. 2022-05-21 21:43:00 -05:00
chat.py Remove some gimmicky r/drama features. 2022-05-21 21:43:00 -05:00
comments.py Set comment filter status based on settings 2022-07-09 06:33:41 -05:00
discord.py Add trailing LF to text files 2022-05-10 21:05:51 -04:00
errors.py Add trailing LF to text files 2022-05-10 21:05:51 -04:00
feeds.py Add trailing LF to text files 2022-05-10 21:05:51 -04:00
front.py Merge branch 'frost' into new-user-filtering 2022-06-06 14:56:28 -04:00
giphy.py Convert text file line endings to LF. 2022-05-09 07:20:47 -05:00
login.py Fixes #110 "Signout doesn't always work" 2022-07-29 06:47:19 -05:00
oauth.py Convert text file line endings to LF. 2022-05-09 07:20:47 -05:00
posts.py Filter on other pages as well 2022-07-09 06:33:41 -05:00
reporting.py Switch over comment reporting to use the new system 2022-07-09 06:33:41 -05:00
search.py Add trailing LF to text files 2022-05-10 21:05:51 -04:00
settings.py Remove some gimmicky r/drama features. 2022-05-21 21:43:00 -05:00
static.py Made a lot of small changes in the frontend 2022-06-04 07:48:26 -05:00
subs.py Add trailing LF to text files 2022-05-10 21:05:51 -04:00
users.py Merge pull request #121 from zorbathut/pr_hidevotes 2022-07-26 23:16:08 -04:00
votes.py Hide vote details from non-admins. 2022-07-23 03:04:43 -05:00