From b62ed4b34e9adc2f6fa840ced1ee2ef98128a2d4 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Fri, 18 Dec 2020 23:30:29 +0100 Subject: [PATCH] Fix keep-alive (maybe ?) --- pynyaata/__init__.py | 2 ++ requirements.txt | 1 + 2 files changed, 3 insertions(+) diff --git a/pynyaata/__init__.py b/pynyaata/__init__.py index 1472027..aab3b79 100644 --- a/pynyaata/__init__.py +++ b/pynyaata/__init__.py @@ -2,6 +2,7 @@ from functools import wraps from operator import attrgetter, itemgetter from flask import redirect, render_template, request, url_for, abort +from werkzeug.serving import WSGIRequestHandler from . import utils from .config import app, auth, ADMIN_USERNAME, ADMIN_PASSWORD, MYSQL_ENABLED, APP_PORT, IS_DEBUG @@ -186,4 +187,5 @@ def admin_edit(link_id=None): def run(): + WSGIRequestHandler.protocol_version = 'HTTP/1.1' app.run('0.0.0.0', APP_PORT, IS_DEBUG) diff --git a/requirements.txt b/requirements.txt index a086dcf..27a0e25 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,3 +11,4 @@ cloudscraper==1.2.48 Js2Py==0.70 polling==0.3.1 dateparser==1.0.0 +Werkzeug==1.0.1