aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/eventsource.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-07-26 15:50:11 +0200
committerRobin Appelman <icewind@owncloud.com>2014-07-26 16:07:11 +0200
commit2c4e06d3259bd70122008c9c31d65af015fa1d96 (patch)
tree02998202efa744c591418d0954733382d452a0c4 /lib/private/eventsource.php
parent40f2a34be113db75cd26166de35e9ba3076e4cf3 (diff)
downloadnextcloud-server-2c4e06d3259bd70122008c9c31d65af015fa1d96.tar.gz
nextcloud-server-2c4e06d3259bd70122008c9c31d65af015fa1d96.zip
Prevent nginx from buffering event source events
Diffstat (limited to 'lib/private/eventsource.php')
-rw-r--r--lib/private/eventsource.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/private/eventsource.php b/lib/private/eventsource.php
index 5a41ddd8b37..192c1446b5a 100644
--- a/lib/private/eventsource.php
+++ b/lib/private/eventsource.php
@@ -34,6 +34,7 @@ class OC_EventSource{
public function __construct() {
OC_Util::obEnd();
header('Cache-Control: no-cache');
+ header('X-Accel-Buffering: no');
$this->fallback=isset($_GET['fallback']) and $_GET['fallback']=='true';
if($this->fallback) {
$this->fallBackId=$_GET['fallback_id'];
@@ -44,6 +45,7 @@ class OC_EventSource{
}
if( !OC_Util::isCallRegistered()) {
$this->send('error', 'Possible CSRF attack. Connection will be closed.');
+ $this->close();
exit();
}
flush();