Long expiry of showdown_ssl cookie to avoid a potential issue

This commit is contained in:
Cathy J. Fitzpatrick
2013-05-01 19:18:38 -06:00
parent 04b8f845db
commit ca6f0a1e84
2 changed files with 4 additions and 4 deletions

View File

@@ -102,7 +102,7 @@ if (isset($PokemonServers[$config['host']])) {
};
if (/**(!message.teams && !message.prefs) ||**/ $.cookie('showdown_ssl')) {
// use the https origin storage
$.cookie('showdown_ssl', 1, {expires: 14});
$.cookie('showdown_ssl', 1, {expires: 365*3});
return executeRedirect();
}
// copy the existing http storage over to the https origin
@@ -113,7 +113,7 @@ if (isset($PokemonServers[$config['host']])) {
if (e.data === 'init') {
e.source.postMessage($.toJSON(message), origin);
} else if (e.data === 'done') {
$.cookie('showdown_ssl', 1, {expires: 14});
$.cookie('showdown_ssl', 1, {expires: 365*3});
localStorage.clear();
return executeRedirect();
}

View File

@@ -3786,7 +3786,7 @@ teams = (function() {
} else if ((!teams.length && !Object.keys(Tools.prefs.data).length) ||
$.cookie('showdown_ssl')) {
// use the https domain
$.cookie('showdown_ssl', 1, {expires: 14});
$.cookie('showdown_ssl', 1, {expires: 365*3});
return document.location.replace('https://' + document.location.hostname +
document.location.pathname);
} else if (window.postMessage) {
@@ -3801,7 +3801,7 @@ teams = (function() {
prefs: $.toJSON(Tools.prefs.data)
}), origin);
} else if (e.data === 'done') {
$.cookie('showdown_ssl', 1, {expires: 14});
$.cookie('showdown_ssl', 1, {expires: 365*3});
localStorage.clear();
return document.location.replace('https://' + document.location.hostname +
document.location.pathname);