mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-02 13:58: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:
@@ -77,6 +77,13 @@ try:
|
||||
|
||||
matrix_data_cache_manager = MatrixDataCacheManager()
|
||||
app_config.complete_config(matrix_data_cache_manager, logging.info)
|
||||
|
||||
if not app_config.server__flask_secret_key:
|
||||
logging.critical(
|
||||
f"flask_secret_key is not provided. Either set in config file, or in CXG_SECRET_KEY environment variable"
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
user_annotations = app_config.user_annotations
|
||||
|
||||
server = WSGIServer(matrix_data_cache_manager, user_annotations, app_config)
|
||||
|
||||
Reference in New Issue
Block a user