Skip to content

Commit

Permalink
Expire mobile guide cookie after 24 hours
Browse files Browse the repository at this point in the history
See #9360

This is to prevent it from always working. Cookies without an expiration are supposed to expire at the end of the session, however the nature of mobile browsers means that the session is unlikely to ever end.
  • Loading branch information
turt2live committed Apr 2, 2019
1 parent 958260d commit b1c885a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vector/mobile_guide/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import {getVectorConfig} from '../getconfig';

function onBackToRiotClick() {
document.cookie = 'mobile_redirect_to_guide=false;path=/';
// Cookie should expire in 24 hours
document.cookie = 'mobile_redirect_to_guide=false;path=/;max-age=86400';
window.location.href = '../';
}

Expand Down

0 comments on commit b1c885a

Please sign in to comment.