On Firefox 130 the logout (301 redirection to admin page) is getting cached and hence the logout action does not take place. Adding Cache-control to specify the browser to not-cache this is required for logout to work properly.
30 lines
539 B
PHP
30 lines
539 B
PHP
<?php defined('BLUDIT') or die('Bludit CMS.');
|
|
|
|
class Redirect {
|
|
|
|
public static function url($url, $httpCode=301)
|
|
{
|
|
if (!headers_sent()) {
|
|
header("Location:".$url, TRUE, $httpCode);
|
|
exit(0);
|
|
}
|
|
|
|
exit('<meta http-equiv="refresh" content="0; url='.$url.'"/>');
|
|
}
|
|
|
|
public static function page($page)
|
|
{
|
|
self::url(HTML_PATH_ADMIN_ROOT.$page);
|
|
}
|
|
|
|
public static function home()
|
|
{
|
|
self::url(HTML_PATH_ROOT);
|
|
}
|
|
|
|
public static function admin()
|
|
{
|
|
header('Cache-Control: no-store');
|
|
self::url(HTML_PATH_ADMIN_ROOT);
|
|
}
|
|
}
|