[odrs-web/production] Set the environ keys from SetEnv



commit e12af16feef71d9279eb65b8442b88936ab1d40e
Author: Richard Hughes <richard hughsie com>
Date:   Mon Sep 26 13:20:27 2016 +0100

    Set the environ keys from SetEnv

 odrs.wsgi |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/odrs.wsgi b/odrs.wsgi
index 1acffcc..84e4b3f 100644
--- a/odrs.wsgi
+++ b/odrs.wsgi
@@ -6,5 +6,14 @@
 
 import sys
 import os
+
 sys.path.insert(0, os.path.join(os.environ['HOME'], 'html'))
-from flaskapp import app as application
+from flaskapp import app as _application
+
+def application(environ, start_response):
+    for key in ['MYSQL_DB_HOST',
+                'MYSQL_DB_USERNAME',
+                'MYSQL_DB_PASSWORD',
+                'ODRS_REVIEWS_SECRET']:
+        os.environ[key] = environ[key]
+    return _application(environ, start_response)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]