mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-29 19:18: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:
@@ -275,6 +275,7 @@ class CliLaunchServer(Server):
|
||||
"""
|
||||
the CLI runs a local web server, and needs to enable a few more features.
|
||||
"""
|
||||
|
||||
def __init__(self, matrix_data_cache_manager, annotations, app_config):
|
||||
super().__init__(matrix_data_cache_manager, annotations, app_config)
|
||||
|
||||
@@ -394,6 +395,10 @@ def launch(
|
||||
|
||||
app_config.complete_config(matrix_data_cache_manager, messagefn)
|
||||
|
||||
# Use a default secret if one is not provided
|
||||
if not app_config.server__flask_secret_key:
|
||||
app_config.server__flask_secret_key = "SparkleAndShine"
|
||||
|
||||
except (ConfigurationError, DatasetAccessError) as e:
|
||||
raise click.ClickException(e)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user