From a435f3612b1d6a52d80f83e237d597b93ed27560 Mon Sep 17 00:00:00 2001 From: Tim Bendt Date: Wed, 26 Nov 2025 11:34:36 -0500 Subject: [PATCH] cookie path subdomain --- system/pancake/config/config.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/system/pancake/config/config.php b/system/pancake/config/config.php index b774cfa..92b3658 100755 --- a/system/pancake/config/config.php +++ b/system/pancake/config/config.php @@ -41,8 +41,8 @@ foreach ($htaccess_servers as $server) { } } -# This section is here so that the installer can override index_page detection if it's incorrect -# (e.g. .htaccess exists but URL rewriting is not on, so index.php should still be added to URLs) +# This section is here so that the installer can override index_page detection if it's incorrect +# (e.g. .htaccess exists but URL rewriting is not on, so index.php should still be added to URLs) # Don't touch it. $config['index_page'] = $config['index_page']; @@ -353,13 +353,14 @@ $config['sess_time_to_update'] = 28800; | 'cookie_path' = Typically will be a forward slash | */ -$config['cookie_prefix'] = ""; -$config['cookie_domain'] = ""; -$config['cookie_path'] = isset($_SERVER['HTTP_HOST']) ? str_ireplace(array('http://'.$_SERVER['HTTP_HOST'], 'https://'.$_SERVER['HTTP_HOST']), '', BASE_URL) : "/"; -$config['cookie_path'] = preg_replace('/\/+/', '/', $config['cookie_path']); +$config['cookie_prefix'] = ""; +$config['cookie_domain'] = ""; // or '.pancake.bendtstudio.com' if you prefer +$config['cookie_path'] = "/"; // always root on this domain +// $config['cookie_path'] = isset($_SERVER['HTTP_HOST']) ? str_ireplace(array('http://'.$_SERVER['HTTP_HOST'], 'https://'.$_SERVER['HTTP_HOST']), '', BASE_URL) : "/"; +// $config['cookie_path'] = preg_replace('/\/+/', '/', $config['cookie_path']); # Fixes an issue where the cookie path would include the server port. -$config['cookie_path'] = preg_replace('/^:\d+\//', '/', $config['cookie_path']); +// $config['cookie_path'] = preg_replace('/^:\d+\//', '/', $config['cookie_path']); /* |-------------------------------------------------------------------------- @@ -457,4 +458,4 @@ $config['modules_locations'] = array( ); /* End of file config.php */ -/* Location: ./application/config/config.php */ \ No newline at end of file +/* Location: ./application/config/config.php */