Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

Commit

Permalink
X-Accel-Buffering header
Browse files Browse the repository at this point in the history
  • Loading branch information
loleg committed Dec 14, 2018
1 parent a243b85 commit 4b2954c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def generate():
p = str(100*c_progress)
yield 'data: { "p":'+p+',"f":"'+c_filename+'"}\n\n'
time.sleep(1.0)
return Response(generate(), mimetype='text/event-stream')
return Response(generate(), mimetype='text/event-stream', headers={'X-Accel-Buffering': 'no'})

# Refresh search index
@app.route('/reindex', methods=['POST'])
Expand Down

0 comments on commit 4b2954c

Please sign in to comment.