Skip to content

Commit e96381f

Browse files
haddowgGregory Haddow
andauthored
fix: merge headers rather than replacing them (#18)
Co-authored-by: Gregory Haddow <[email protected]>
1 parent ed3806f commit e96381f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Core/Responses/Concerns/IsResponsable.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,12 @@ public function withHeader(string $name, string $value = null): self
154154
* Set response headers.
155155
*
156156
* @param array $headers
157+
* @param bool $merge
157158
* @return $this
158159
*/
159160
public function withHeaders(array $headers): self
160161
{
161-
$this->headers = $headers;
162+
$this->headers = array_merge($this->headers, $headers);
162163

163164
return $this;
164165
}

0 commit comments

Comments
 (0)