Skip to content

Commit

Permalink
Update Application.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuring authored Dec 6, 2024
1 parent 5b8d001 commit 5b0b57f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ public function middleware(MiddlewareQueue $middlewareQueue): MiddlewareQueue
{
$csrfProtectionMiddlewareOptions = ['httponly' => true];
//リクエストがhttpsならcsrfTokenにもsecureヘッダを付与
$sessionConfig = (array)Configure::read('Session');
if (!empty($sessionConfig['ini']['session.cookie_secure']) || ini_get('session.cookie_secure') == 1) {
$sessionConfig = (array) Configure::read('Session');
if (!empty($sessionConfig['ini']['session.cookie_secure']) || (int) ini_get('session.cookie_secure') === 1) {
$csrfProtectionMiddlewareOptions['secure'] = true;
}
$middlewareQueue
Expand Down

0 comments on commit 5b0b57f

Please sign in to comment.