1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 06:07:32 +02:00

Debug code.

This commit is contained in:
Cameron
2017-10-23 12:59:30 -07:00
parent 9ac287a4a3
commit 80129e8838

View File

@@ -2612,6 +2612,13 @@ class e_http_header
}
private function unsetHeader($header)
{
header_remove($header);
}
function send()
{
@@ -2626,6 +2633,34 @@ class e_http_header
*/
// $this->setHeader("Cache-Control: public", true);
/*
if(defined('e_HTTP_STATIC'))
{
unset($_COOKIE);
$siteurl = str_replace('https','http',SITEURL);
$static = str_replace('https','http', e_HTTP_STATIC);
if($siteurl === $static && deftrue('e_SUBDOMAIN'))
{
$accessControl = str_replace(e_SUBDOMAIN.'.', '', SITEURLBASE);
$this->unsetHeader("Cache-Control");
// $this->unsetHeader("Content-Type");
$this->unsetHeader("Set-Cookie");
$this->unsetHeader("Pragma");
$this->unsetHeader("Expires");
$this->setHeader("Access-Control-Allow-Origin: ".$accessControl, true);
$this->setHeader("Cache-Control: public", true);
}
else
{
$this->setHeader("Access-Control-Allow-Origin: ".$static, true);
}
}
*/
$canCache = e107::canCache();
@@ -2679,6 +2714,8 @@ class e_http_header
$this->setHeader('Vary: Accept');
}
// should come after the Etag header
if ($canCache && isset($_SERVER['HTTP_IF_NONE_MATCH']))
{