diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-02-16 07:50:17 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-02-16 07:50:17 +0100 |
commit | 3068763a37193e0affe48608011d86aa25e8de83 (patch) | |
tree | b21fd941e12f55e2e43b1432a8e0cdb5c147371f /src/bootstrap.py | |
parent | It is again possible (for an administrator) to delete the feed of a user. (diff) | |
download | newspipe-3068763a37193e0affe48608011d86aa25e8de83.tar.gz newspipe-3068763a37193e0affe48608011d86aa25e8de83.tar.bz2 newspipe-3068763a37193e0affe48608011d86aa25e8de83.zip |
I now know why my sessios was always lost on Heroku...
Diffstat (limited to 'src/bootstrap.py')
-rw-r--r-- | src/bootstrap.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bootstrap.py b/src/bootstrap.py index f7a3754c..25528ef5 100644 --- a/src/bootstrap.py +++ b/src/bootstrap.py @@ -40,7 +40,9 @@ application.config['PREFERRED_URL_SCHEME'] = scheme set_logging(conf.LOG_PATH, log_level=conf.LOG_LEVEL) # Create secrey key so we can use sessions -application.config['SECRET_KEY'] = os.urandom(12) +application.config['SECRET_KEY'] = getattr(conf, 'WEBSERVER_SECRET', None) +if not application.config['SECRET_KEY']: + application.config['SECRET_KEY'] = os.urandom(12) application.config['RECAPTCHA_USE_SSL'] = True application.config['RECAPTCHA_PUBLIC_KEY'] = conf.RECAPTCHA_PUBLIC_KEY |