Thorsten wrote:Hi,
looks like something in your nginx is wrong as all JavaScript and CSS files return an aborted HTTP response. Please check your nginx error log.
bye
Thorsten
Yes, because it is trying to load the script files via HTTPS (SSL) when it should be using HTTP (NON SECURE).
After looking on the net for a while, I found this:
http://dev.cmsmadesimple.org/bug/view/9559
Which means the logic in Link.php:
Code: Select all
public static function getSystemScheme()
{
if (PMF_Configuration::getInstance()->get('security.useSslOnly')) {
return 'https://';
}
$scheme = 'http' . (((!PMF_Link::isIISServer()) && isset($_SERVER['HTTPS'])) ||
((PMF_Link::isIISServer()) && ('on' == strtolower($_SERVER['HTTPS']))) ? 's' : '') . '://';
return $scheme;
}
Is not correct. $_SERVER['HTTPS'] isset but has an empty value on nginx.
So, I changed this function to:
Code: Select all
public static function getSystemScheme()
{
if (PMF_Configuration::getInstance()->get('security.useSslOnly')) {
return 'https://';
}
$scheme = 'http' . (((!PMF_Link::isIISServer()) && (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']))) ||
((PMF_Link::isIISServer()) && ('on' == strtolower($_SERVER['HTTPS']))) ? 's' : '') . '://';
return $scheme;
}
And, I'm back in business. Hopefully this will help others, and maybe the code should be changed to check for HTTPS in a different manner?