Added missing http-headers (#232)

To be able to pass traffic through http proxies.
This is to disable caching/buffering of responses.
This commit is contained in:
Petter Solberg
2019-06-04 20:10:08 +02:00
committed by Henning Jacobs
parent bf3e4f4c54
commit 2c5af20fac

View File

@@ -110,7 +110,7 @@ def get_events():
for _id in flask.request.args.get('cluster_ids', '').split():
if _id:
cluster_ids.add(_id)
return flask.Response(event(cluster_ids), mimetype='text/event-stream')
return flask.Response(event(cluster_ids), mimetype='text/event-stream', headers={'Cache-Control': 'no-cache', 'X-Accel-Buffering': 'no'})
@app.route('/screen-tokens', methods=['GET', 'POST'])