mirror of
https://gitlab.com/octospacc/TelegramIndex-Fork.git
synced 2025-06-05 22:09:12 +02:00
add basic auth support and few under the hood changes
This commit is contained in:
@ -55,6 +55,8 @@ authenticated = username and password
|
||||
SESSION_COOKIE_LIFETIME = int(os.environ.get("SESSION_COOKIE_LIFETIME") or "60")
|
||||
try:
|
||||
SECRET_KEY = os.environ["SECRET_KEY"]
|
||||
if len(SECRET_KEY) != 32:
|
||||
raise ValueError("SECRET_KEY should be exactly 32 charaters long")
|
||||
except (KeyError, ValueError):
|
||||
if authenticated:
|
||||
traceback.print_exc()
|
||||
|
Reference in New Issue
Block a user