From 2d5bd3085feddf23419e8697e2a7f811d8bdb600 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 10 Dec 2015 13:20:27 +0100 Subject: [PATCH] Don't send cookies on API requests --- library/Icinga/Web/Response.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Web/Response.php b/library/Icinga/Web/Response.php index ffe14ee45..eca389daa 100644 --- a/library/Icinga/Web/Response.php +++ b/library/Icinga/Web/Response.php @@ -254,7 +254,9 @@ class Response extends Zend_Controller_Response_Http public function sendHeaders() { $this->prepare(); - $this->sendCookies(); + if (! $this->getRequest()->isApiRequest()) { + $this->sendCookies(); + } return parent::sendHeaders(); } }