From 624b9cf3d7342188333016326d51dbf4ba6e3a64 Mon Sep 17 00:00:00 2001 From: neingeist Date: Thu, 29 Nov 2018 16:49:55 +0100 Subject: [PATCH] Work around having no access to Apache SetEnv variables --- prolefeeder.wsgi | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/prolefeeder.wsgi b/prolefeeder.wsgi index 97a1477..7b3c036 100644 --- a/prolefeeder.wsgi +++ b/prolefeeder.wsgi @@ -1 +1,11 @@ -from prolefeeder import app as application +import os + +def application(req_environ, start_response): + + # Work around having no access to Apache SetEnv variables: + for k in ['SECRET_KEY', 'DATA_DIR', 'TMP_DIR', 'MAX_LENGTH', 'KBITS']: + if k in req_environ: + os.environ[k] = req_environ[k] + + from prolefeeder import app as _application + return _application(req_environ, start_response)