Browse Source

Use default value if samesite is not set

Tadahisa Motooka 5 years ago
parent
commit
7b0f7664e2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Http/Middleware/CsrfProtectionMiddleware.php

+ 1 - 1
src/Http/Middleware/CsrfProtectionMiddleware.php

@@ -207,7 +207,7 @@ class CsrfProtectionMiddleware
             '',
             (bool)$this->_config['secure'],
             (bool)$this->_config['httpOnly'],
-            $this->_config['samesite']
+            isset($this->_config['samesite']) ? $this->_config['samesite'] : $this->_defaultConfig['samesite']
         );
 
         return $response->withCookie($cookie);