Commit dd5a118b authored by Jérome Perrin's avatar Jérome Perrin

runner: import werkzeug.middleware.proxy_fix.ProxyFix from its new location

from
https://werkzeug.palletsprojects.com/en/0.14.x/contrib/fixers/#werkzeug.contrib.fixers.ProxyFix
to
https://werkzeug.palletsprojects.com/en/1.0.x/middleware/proxy_fix/#werkzeug.middleware.proxy_fix.ProxyFix

the behavior seems the same, default config in both cases is to trust one
level of proxy.
parent bd63a31a
...@@ -110,7 +110,10 @@ def run(): ...@@ -110,7 +110,10 @@ def run():
serve(config) serve(config)
def serve(config): def serve(config):
from werkzeug.contrib.fixers import ProxyFix try:
from werkzeug.middleware.proxy_fix import ProxyFix
except ImportError:
from werkzeug.contrib.fixers import ProxyFix
workdir = os.path.join(config.runner_workdir, 'project') workdir = os.path.join(config.runner_workdir, 'project')
software_link = os.path.join(config.runner_workdir, 'softwareLink') software_link = os.path.join(config.runner_workdir, 'softwareLink')
app.config.update(**config.__dict__) app.config.update(**config.__dict__)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment