Skip to content

Commit

Permalink
fix: merge headers rather than replacing them (#18)
Browse files Browse the repository at this point in the history
Co-authored-by: Gregory Haddow <[email protected]>
  • Loading branch information
haddowg and Gregory Haddow authored Aug 21, 2024
1 parent ed3806f commit e96381f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Core/Responses/Concerns/IsResponsable.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,12 @@ public function withHeader(string $name, string $value = null): self
* Set response headers.
*
* @param array $headers
* @param bool $merge
* @return $this
*/
public function withHeaders(array $headers): self
{
$this->headers = $headers;
$this->headers = array_merge($this->headers, $headers);

return $this;
}
Expand Down

0 comments on commit e96381f

Please sign in to comment.