mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-03 19:38:12 +08:00
Added a config hook for secret key into the app. (#1304)
* Added a config hook for secret key into the app. the server first looks in an environment variable, then looks in a config file. For the cellxgene launch app, a default key is used if none is provided. For the eb app, a secret key must be provided.
This commit is contained in:
+2
-2
@@ -207,8 +207,8 @@ class Server:
|
||||
self.app.permanent_session_lifetime = datetime.timedelta(days=50 * 365)
|
||||
|
||||
# Config
|
||||
SECRET_KEY = os.environ.get("CXG_SECRET_KEY", default="SparkleAndShine")
|
||||
self.app.config.update(SECRET_KEY=SECRET_KEY)
|
||||
secret_key = app_config.server__flask_secret_key
|
||||
self.app.config.update(SECRET_KEY=secret_key)
|
||||
|
||||
self.app.register_blueprint(webbp)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user