fix issue when SECRET_KEY is not provided
This commit is contained in:
parent
ce1aec90a9
commit
71f0a11789
|
@ -51,7 +51,7 @@ if not logo_folder.exists():
|
||||||
username = os.environ.get("TGINDEX_USERNAME", "")
|
username = os.environ.get("TGINDEX_USERNAME", "")
|
||||||
password = os.environ.get("PASSWORD", "")
|
password = os.environ.get("PASSWORD", "")
|
||||||
SHORT_URL_LEN = int(os.environ.get("SHORT_URL_LEN", 3))
|
SHORT_URL_LEN = int(os.environ.get("SHORT_URL_LEN", 3))
|
||||||
authenticated = username and password
|
authenticated = bool(username and password)
|
||||||
SESSION_COOKIE_LIFETIME = int(os.environ.get("SESSION_COOKIE_LIFETIME") or "60")
|
SESSION_COOKIE_LIFETIME = int(os.environ.get("SESSION_COOKIE_LIFETIME") or "60")
|
||||||
try:
|
try:
|
||||||
SECRET_KEY = os.environ["SECRET_KEY"]
|
SECRET_KEY = os.environ["SECRET_KEY"]
|
||||||
|
|
Loading…
Reference in New Issue