Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ protected function configdStream(
) {
$response = (new Backend())->configdpStream($action, $params, $poll_timeout);

/* disable nginx reverse proxy buffering so streamed configd output is delivered in real time */
$headers[] = 'X-Accel-Buffering: no';
foreach ($headers as $header) {
$parts = explode(':', $header, 2);
$this->response->setHeader($parts[0], ltrim($parts[1]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ public function __call($name, $arguments)
[$offset, $searchPhrase, $module, $scope, $severities],
[
'Content-Type: text/event-stream',
'Cache-Control: no-cache',
'X-Accel-Buffering: no' /* disable nginx reverse proxy buffering for SSE streams to ensure real-time delivery */
'Cache-Control: no-cache'
],
60 /* XXX */
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function streamAction($poll_interval = 1)
[$poll_interval],
[
'Content-Type: text/event-stream',
'Cache-Control: no-cache',
'Cache-Control: no-cache'
],
$poll_interval + 1
);
Expand Down