StrictTransportSecurity syntax fix

This commit is contained in:
Mikael Nordfeldth 2015-05-03 22:50:44 +02:00
parent 2b58d6b774
commit 6d72800098

View File

@ -27,9 +27,7 @@
* @link http://status.net/ * @link http://status.net/
*/ */
if (!defined('STATUSNET') && !defined('LACONICA')) { if (!defined('GNUSOCIAL')) { exit(1); }
exit(1);
}
class StrictTransportSecurityPlugin extends Plugin class StrictTransportSecurityPlugin extends Plugin
{ {
@ -45,7 +43,8 @@ class StrictTransportSecurityPlugin extends Plugin
{ {
$path = common_config('site', 'path'); $path = common_config('site', 'path');
if(common_config('site', 'ssl') == 'always' && ($path == '/' || ! $path )) { if(common_config('site', 'ssl') == 'always' && ($path == '/' || ! $path )) {
header('Strict-Transport-Security: max-age=' . $this->max_age . + ($this->includeSubDomains?'; includeSubDomains':'')); header('Strict-Transport-Security: max-age=' . $this->max_age
. ($this->includeSubDomains ? '; includeSubDomains' : ''));
} }
} }