mirror of
https://github.com/JonasunderscoreJones/selfhosted-overleaf-project-share.git
synced 2025-10-24 09:39:19 +02:00
moved to .env for parameters
This commit is contained in:
parent
6969c7d77c
commit
0422dc08c7
2 changed files with 9 additions and 5 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
|||
public/projects/*
|
||||
__pycache__/
|
||||
__pycache__/
|
||||
.env
|
||||
11
serve.py
11
serve.py
|
|
@ -5,12 +5,15 @@ from urllib.parse import unquote
|
|||
import io
|
||||
import zipfile
|
||||
from datetime import datetime
|
||||
from dotenv import load_dotenv
|
||||
|
||||
PORT = 8000
|
||||
load_dotenv()
|
||||
|
||||
PORT = int(os.getenv("PORT", 8000)) # Default port is 8000 if not set
|
||||
BASE_DIR = os.path.abspath("public")
|
||||
GRAB_SYMLINKS = True # Toggle symlink handling on/off
|
||||
SYMLINK_DIR = os.path.abspath("symlinks") # Directory to resolve symlinks to
|
||||
STATIC_SHARE_RESTRICTION = True # Toggle restriction on/off
|
||||
GRAB_SYMLINKS = os.getenv("GRAB_SYMLINKS", "true").lower() == "true" # Toggle symlink grabbing
|
||||
SYMLINK_DIR = os.getenv("SYMLINK_DIR", "symlinks") # Directory where symlinks are stored
|
||||
STATIC_SHARE_RESTRICTION = os.getenv("STATIC_SHARE_RESTRICTION", "true").lower() == "true" # Restrict access to .staticshare
|
||||
|
||||
def create_symlink_to_dir(symlink_target, link_path):
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue