1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 22:53:59 +00:00

Fix nginx closing WebSocket connection after 60 seconds (#370)

* Test

* Add keepalive

* Revert "Add keepalive"

This reverts commit 8b92198122.

* Update dashboard.py

* Revert

* Lint
This commit is contained in:
Otto Winter
2019-01-19 22:10:10 +01:00
committed by GitHub
parent e13bffbb2f
commit eb39add6fc
3 changed files with 17 additions and 6 deletions

View File

@@ -511,6 +511,12 @@ def make_app(debug=False):
self.set_header('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0')
static_path = os.path.join(os.path.dirname(__file__), 'static')
settings = {
'debug': debug,
'cookie_secret': COOKIE_SECRET,
'log_function': log_function,
'websocket_ping_interval': 30.0,
}
app = tornado.web.Application([
(r"/", MainRequestHandler),
(r"/login", LoginHandler),
@@ -527,7 +533,7 @@ def make_app(debug=False):
(r"/ping", PingRequestHandler),
(r"/wizard.html", WizardRequestHandler),
(r'/static/(.*)', StaticFileHandler, {'path': static_path}),
], debug=debug, cookie_secret=COOKIE_SECRET, log_function=log_function)
], **settings)
if debug:
_STATIC_FILE_HASHES.clear()

View File

@@ -409,7 +409,7 @@
</div>
</div>
<div class="modal-footer">
<a class="modal-close waves-effect waves-green btn-flat stop-logs">Stop</a>
<a class="modal-close waves-effect waves-green btn-flat stop-logs">Close</a>
</div>
</div>