From 48baf93f25c3ae14bdddbfec0a8c2516644ee071 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Sun, 20 Oct 2019 23:00:09 -0400 Subject: [PATCH] Fixed #161 - Reload loop after migration from beestat.io/dashboard to app.beestat.io This is a temporary change to address the reload loop due to bad cookies from beestat.io --- index.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/index.php b/index.php index 56c4e73..250194b 100644 --- a/index.php +++ b/index.php @@ -22,5 +22,27 @@ if(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'; }