Commit 6c379644 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

slaprunner: add support for reverse proxy

parent dbb92076
...@@ -127,6 +127,7 @@ def run(): ...@@ -127,6 +127,7 @@ def run():
def serve(config): def serve(config):
from views import app from views import app
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__)
...@@ -148,5 +149,6 @@ def serve(config): ...@@ -148,5 +149,6 @@ def serve(config):
config.logger.info('Running slapgrid...') config.logger.info('Running slapgrid...')
runInstanceWithLock(app.config) runInstanceWithLock(app.config)
config.logger.info('Done.') config.logger.info('Done.')
app.wsgi_app = ProxyFix(app.wsgi_app)
app.run(host=config.runner_host, port=int(config.runner_port), app.run(host=config.runner_host, port=int(config.runner_port),
debug=config.debug, threaded=True) debug=config.debug, threaded=True)
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