From aee4b52d95ff3930a0a28bfd758a66288b3220dd Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Fri, 3 Jan 2020 08:08:27 -0500 Subject: [PATCH] Closed #171 - Remove temporary cookie fixes Related to #161 and associated changes. --- index.php | 22 ---------------------- js/beestat/api.js | 3 +-- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/index.php b/index.php index e37de05..201985c 100644 --- a/index.php +++ b/index.php @@ -24,27 +24,5 @@ if($setting->is_demo() === true || preg_match('/app\.beestat\.io/', $_SERVER['HTTP_HOST']) !== 0) { require 'app.php'; } else { - - // When on regular beestat.io, delete these cookies. - setcookie( - 'session_key', - '', - time() - 86400, - '/', - '', - true, - true - ); - - setcookie( - 'session_user_id', - '', - time() - 86400, - '/', - '', - true, - true - ); - require 'www.php'; } diff --git a/js/beestat/api.js b/js/beestat/api.js index 3bc0f34..46eb389 100644 --- a/js/beestat/api.js +++ b/js/beestat/api.js @@ -178,8 +178,7 @@ beestat.api.prototype.load_ = function(response_text) { response.data.error_code === 10003 // Could not refresh ecobee token; ecobee returned no token. ) ) { - // window.location.href = '/'; - window.location.href = 'https://beestat.io'; + window.location.href = '/'; return; } else if (response.data && response.data.error_code === 1209) { // Could not get lock; safe to ignore as that means sync is running.