summaryrefslogtreecommitdiffstats
path: root/lib/public/AppFramework/Http/Response.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/AppFramework/Http/Response.php')
-rw-r--r--lib/public/AppFramework/Http/Response.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/public/AppFramework/Http/Response.php b/lib/public/AppFramework/Http/Response.php
index 6f418e42553..832e0b96247 100644
--- a/lib/public/AppFramework/Http/Response.php
+++ b/lib/public/AppFramework/Http/Response.php
@@ -133,11 +133,12 @@ class Response {
* @param \DateTime|null $expireDate Date on that the cookie should expire, if set
* to null cookie will be considered as session
* cookie.
+ * @param string $sameSite The samesite value of the cookie. Defaults to Lax. Other possibilities are Strict or None
* @return $this
* @since 8.0.0
*/
- public function addCookie($name, $value, \DateTime $expireDate = null) {
- $this->cookies[$name] = ['value' => $value, 'expireDate' => $expireDate];
+ public function addCookie($name, $value, \DateTime $expireDate = null, $sameSite = 'Lax') {
+ $this->cookies[$name] = ['value' => $value, 'expireDate' => $expireDate, 'sameSite' => $sameSite];
return $this;
}