瀏覽代碼

fix sameSite for cookie #1010

walkor 1 年之前
父節點
當前提交
3b7f39c3c2
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/Protocols/Http/Response.php

+ 2 - 2
src/Protocols/Http/Response.php

@@ -357,10 +357,10 @@ class Response implements Stringable
      * @param string $domain
      * @param bool $secure
      * @param bool $httpOnly
-     * @param bool $sameSite
+     * @param string $sameSite
      * @return $this
      */
-    public function cookie(string $name, string $value = '', int $maxAge = null, string $path = '', string $domain = '', bool $secure = false, bool $httpOnly = false, bool $sameSite = false): static
+    public function cookie(string $name, string $value = '', int $maxAge = null, string $path = '', string $domain = '', bool $secure = false, bool $httpOnly = false, string $sameSite = ''): static
     {
         $this->headers['Set-Cookie'][] = $name . '=' . rawurlencode($value)
             . (empty($domain) ? '' : '; Domain=' . $domain)