Skip to content

Commit

Permalink
Merge pull request #392 from nanasess/fix-symfony-cli
Browse files Browse the repository at this point in the history
正常に HTTPS 判定されるよう修正
  • Loading branch information
okazy authored May 18, 2020
2 parents 4929cf1 + 3930ee7 commit 2d63ec8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion data/app_initial.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

// スクリプトが HTTPS プロトコルを通じて実行されている場合に 空でない値が設定される.
// Webサーバーによっては 'On' が設定されるため正規化する
// see https://www.php.net/manual/ja/reserved.variables.server.php
if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') { // ISAPI/IIS の場合は off になる
$_SERVER['HTTPS'] = 'on';
}
// Flexible SSLへの対応
if( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && 'https' == $_SERVER['HTTP_X_FORWARDED_PROTO'] ){
$_SERVER['HTTPS'] = 'on';
Expand Down Expand Up @@ -54,4 +60,3 @@
// アプリケーション初期化処理
$objInit = new SC_Initial_Ex();
$objInit->init();

0 comments on commit 2d63ec8

Please sign in to comment.