causefx 7 years ago
parent
commit
9b4002b101
1 changed files with 2 additions and 2 deletions
  1. 2 2
      api/functions.php

+ 2 - 2
api/functions.php

@@ -7,14 +7,14 @@ require_once(__DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'a
 foreach (glob(__DIR__ . DIRECTORY_SEPARATOR . 'functions' . DIRECTORY_SEPARATOR . '*.php') as $filename) {
 	require_once $filename;
 }
-//Cookie name
-$GLOBALS['cookieName'] = 'organizr_token_' . hash('sha256', parseDomain($_SERVER['HTTP_HOST']));
 // Add in default and custom settings
 configLazy();
 // Define Logs and files after db location is set
 if (isset($GLOBALS['dbLocation'])) {
 	$GLOBALS['organizrLog'] = $GLOBALS['dbLocation'] . 'organizrLog.json';
 	$GLOBALS['organizrLoginLog'] = $GLOBALS['dbLocation'] . 'organizrLoginLog.json';
+	//Cookie name
+	$GLOBALS['cookieName'] = 'organizr_token_' . hash('sha256', $GLOBALS['organizrAPI']);
 	//Upgrade Check
 	upgradeCheck();
 }