mirror of
https://gitlab.com/octospacc/TelegramIndex-Fork.git
synced 2025-02-16 11:31:44 +01:00
✨ added SHORT_URL_LEN to env
This commit is contained in:
parent
83c5528fea
commit
befe2b18b9
@ -49,6 +49,7 @@ pip3 install -U -r requirements.txt
|
||||
| `RESULTS_PER_PAGE` (optional) | Number of results to be returned per page defaults to 20.
|
||||
| `TGINDEX_USERNAME` (optional) | Username for authentication, defaults to `''`.
|
||||
| `PASSWORD` (optional) | Username for authentication, defaults to `''`.
|
||||
| `SHORT_URL_LEN` (optional) | Url length for aliases
|
||||
| `SESSION_COOKIE_LIFETIME` (optional) | Number of minutes, for which authenticated session is valid for, after which user has to login again. defaults to 60.
|
||||
| `SECRET_KEY` (optional) | Long string for signing the session cookies, required if authentication is enabled.
|
||||
|
||||
|
@ -49,7 +49,7 @@ if not logo_folder.exists():
|
||||
logo_folder.mkdir(parents=True)
|
||||
username = os.environ.get("TGINDEX_USERNAME", "")
|
||||
password = os.environ.get("PASSWORD", "")
|
||||
SHORT_URL_LEN = 3
|
||||
SHORT_URL_LEN = int(os.environ.get("SHORT_URL_LEN", 3))
|
||||
authenticated = username and password
|
||||
SESSION_COOKIE_LIFETIME = int(os.environ.get("SESSION_COOKIE_LIFETIME") or "60")
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user