We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f42f314 commit eae0ac3Copy full SHA for eae0ac3
gramps_webapi/app.py
@@ -59,9 +59,10 @@ def create_app(db_manager=None):
59
if not app.config.get("TREE"):
60
raise ValueError("TREE must be specified")
61
62
- # if secret key is missing, try to get it from the env or fail
+ # if secret key is missing, try to get it from the env
63
app.config["SECRET_KEY"] = app.config["SECRET_KEY"] or os.getenv("SECRET_KEY")
64
- if not app.config.get("SECRET_KEY"):
+ # still not found? Fail, unless auth is disabled
65
+ if not app.config.get("SECRET_KEY") and not app.config.get("DISABLE_AUTH"):
66
raise ValueError("SECRET_KEY must be specified")
67
68
# try setting media basedir from environment
0 commit comments