[odrs-web] Set the environ keys from SetEnv
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [odrs-web] Set the environ keys from SetEnv
- Date: Tue, 27 Sep 2016 11:30:36 +0000 (UTC)
commit a4f946d07d745458b1640baeb71847bfc8f30e23
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]