Browse Source

Merge pull request #1800 from ginus/patch-1

fix when $_SERVER['HTTPS'] is "ON"
tags/2.0.0-beta
Alexander Makarov 11 years ago
parent
commit
f880bb190c
  1. 4
      framework/yii/web/Request.php

4
framework/yii/web/Request.php

@ -668,8 +668,8 @@ class Request extends \yii\base\Request
*/ */
public function getIsSecureConnection() public function getIsSecureConnection()
{ {
return isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] === 'on' || $_SERVER['HTTPS'] == 1) return isset($_SERVER['HTTPS']) && (strcasecmp($_SERVER['HTTPS'],'on') || $_SERVER['HTTPS'] == 1)
|| isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https'; || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strcasecmp($_SERVER['HTTP_X_FORWARDED_PROTO'],'https');
} }
/** /**

Loading…
Cancel
Save