Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

正常に HTTPS 判定されるよう修正 #392

Merged
merged 1 commit into from
May 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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();