Skip to content

Commit

Permalink
Merge pull request #23 from youngmd/master
Browse files Browse the repository at this point in the history
Disable X-Accel-Buffering in response header
  • Loading branch information
dpskvn authored Jan 15, 2020
2 parents 55db637 + c0324dc commit 30009ce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class SSE extends EventEmitter {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/event-stream');
res.setHeader('Cache-Control', 'no-cache');
res.setHeader('X-Accel-Buffering', 'no');
if (req.httpVersion !== '2.0') {
res.setHeader('Connection', 'keep-alive');
}
Expand Down

0 comments on commit 30009ce

Please sign in to comment.