Skip to content

Commit 24ff0de

Browse files
committed
isHTTPS? Related with SAML-Toolkits#57
1 parent e755cd8 commit 24ff0de

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/Saml2/Utils.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,9 @@ public static function getSelfHost()
315315
*/
316316
public static function isHTTPS()
317317
{
318-
$isHttps = (!empty($_SERVER['HTTPS'])
319-
&& $_SERVER['HTTPS'] !== 'off'
318+
$isHttps = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')
320319
|| (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443)
321-
);
320+
|| (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https');
322321
return $isHttps;
323322
}
324323

0 commit comments

Comments
 (0)