From ea70b8ac0156c44b95100113ca3b4b8884c9fac4 Mon Sep 17 00:00:00 2001 From: Thomas Hoefer Date: Sun, 15 Oct 2023 15:27:32 +0200 Subject: [PATCH] bugfix for cookie path --- zio-http/src/main/scala/zio/http/Response.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zio-http/src/main/scala/zio/http/Response.scala b/zio-http/src/main/scala/zio/http/Response.scala index 7a47ed2e6b..f8b8dd4266 100644 --- a/zio-http/src/main/scala/zio/http/Response.scala +++ b/zio-http/src/main/scala/zio/http/Response.scala @@ -43,7 +43,7 @@ final case class Response( * Adds flash values to the cookie-based flash-scope. */ def addFlash[A](setter: Flash.Setter[A]): Response = - self.addCookie(Flash.Setter.run(setter)) + self.addCookie(Flash.Setter.run(setter).copy(path = Some(Path.root))) /** * Collects the potentially streaming body of the response into a single