diff --git a/fix_werkzeug.patch b/fix_werkzeug.patch deleted file mode 100644 index 0632b27..0000000 --- a/fix_werkzeug.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -U 3 -dHrN -- a/trytond/wsgi.py b/trytond/wsgi.py ---- a/trytond/wsgi.py 2021-02-12 10:14:41.000000000 +0100 -+++ b/trytond/wsgi.py 2021-02-15 12:37:50.432511576 +0100 -@@ -10,13 +10,23 @@ - from werkzeug.wrappers import Response - from werkzeug.routing import Map, Rule - from werkzeug.exceptions import abort, HTTPException, InternalServerError --from werkzeug.contrib.fixers import ProxyFix -+try: -+ from werkzeug.middleware.proxy_fix import ProxyFix -+ -+ def NumProxyFix(app, num_proxies): -+ return ProxyFix(app, -+ x_for=num_proxies, x_proto=num_proxies, x_host=num_proxies, -+ x_port=num_proxies, x_prefix=num_proxies) -+except ImportError: -+ from werkzeug.contrib.fixers import ProxyFix as NumProxyFix - try: - from werkzeug.security import safe_join - except ImportError: - safe_join = posixpath.join -- --from werkzeug.wsgi import SharedDataMiddleware -+try: -+ from werkzeug.middleware.shared_data import SharedDataMiddleware -+except ImportError: -+ from werkzeug.wsgi import SharedDataMiddleware - - import wrapt - -@@ -157,6 +167,6 @@ - app.wsgi_app = SharedDataMiddlewareIndex(app.wsgi_app, static_files) - num_proxies = config.getint('web', 'num_proxies') - if num_proxies: -- app.wsgi_app = ProxyFix(app.wsgi_app, num_proxies=num_proxies) -+ app.wsgi_app = NumProxyFix(app.wsgi_app, num_proxies) - import trytond.protocols.dispatcher - import trytond.bus