Uh oh!
There was an error while loading. Please reload this page.
Allow caching of the logout route - #13757
Conversation
MorrisJobke
commented
Jan 23, 2019
I really don't like that this is handled in there. I would handle it directly in the logout URL handling - just request the URL without any parameter and manually add it then. This reduces unnecessary complexity in the reused method |
rullzer
commented
Jan 23, 2019
Then somebody with JS magic skills needs to tackle it |
MorrisJobke
commented
Jan 23, 2019
Why? It's PHP as well - I would just do it in here: server/lib/private/legacy/user.php Lines 266 to 280 in bb86a8c 😉 |
rullzer
commented
Jan 23, 2019
Aaaaah right ok makes sense. Let me do that then... |
10a5d38 to
84fefb3CompareMorrisJobke
commented
Jan 23, 2019
Still failing: |
By requesting the plain logout url we allow it to be properly cached by the caching router. We just add the requesttoken manually. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
3e9d93c to
ebd9f30Comparedanxuliu
commented
Jan 23, 2019
The acceptance test failures seem legit; for me, logging out now (sometimes) results in an error page with |
MorrisJobke
commented
Jan 23, 2019
😢 |
rullzer
commented
Jan 23, 2019
Aaaah sometimes yes... OK I know what is going on... fix incomming |
Followup of #13757 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
It is a bit more general. If the only argument is the requesttoken. So a
get request will work with the CSRF protection. The route will be
generated without the parameters and the request token will be added at
the end.
Before the route could not properly be cached as the request token was
always changing. However now it can be cached saving precious cpu
cycles.
Noticed while looking at #13712. While #13712 is a general improvement for route generation this fixes the non caching of this specific route.