Skip to content

Commit

Permalink
devel: add keep alive dev server support
Browse files Browse the repository at this point in the history
Since new version of webpack the dev server should support Keep-Alive.
This is not enabled by default in werkzeug.

Co-Authored-by: Johnny Mariéthoz <[email protected]>
  • Loading branch information
jma committed Dec 13, 2022
1 parent e2e0bd0 commit b1b11c0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rero_ils/modules/ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@ def init_config(self, app):
for k in dir(app.config):
if k.startswith('RERO_ILS_APP_'):
app.config.setdefault(k, getattr(app.config, k))
# add keep alive support for angular application
# NOTE: this will not work for werkzeug> 2.1.2
# https://werkzeug.palletsprojects.com/en/2.2.x/changes/#version-2-1-2
if app.config.get('DEBUG'):
from werkzeug.serving import WSGIRequestHandler
WSGIRequestHandler.protocol_version = "HTTP/1.1"

def register_signals(self, app):
"""Register signals."""
Expand Down

0 comments on commit b1b11c0

Please sign in to comment.