add authentication

add built-in cleanup
general refactor
This commit is contained in:
CEF Server 2024-07-29 03:26:14 +00:00
parent 20ee543ab4
commit ba2e896813
15 changed files with 313 additions and 106 deletions

View file

@ -10,11 +10,16 @@ MINIO_EXTERNAL_ADDR = os.getenv("THREEM_MINIO_EXTERNAL_ADDR") or "data.example.x
MINIO_ACCESS_KEY = os.getenv("THREEM_MINIO_ACCESS_KEY") or "access-key-goes-here"
MINIO_SECRET_KEY = os.getenv("THREEM_MINIO_SECRET_KEY") or "secret-key-goes-here"
DBURL = os.getenv("THREEM_DBURL") or "mysql+mysqldb://ergo:password@localhost/ergo_ext"
REDIS_ADDR = os.getenv("THREEM_REDIS_ADDR") or "localhost"
MAX_FILE_SIZE = 1024*1024*20
MAX_PFP_SIZE = 1024*1024*1.5
# It's a 24x24 image, you can fit that in 32k
MAX_ICON_SIZE = 1024*32
# Some endpoints are restricted by accessing IP (bad, I know, but it's what I got for the moment)
# This causes a lookup at initialization to limit those endpoints. Mainly for Docker
PRIVILEGED_HOSTS = ["localhost"]
# Need to figure out how to make this cooperate more
ALLOWED_DOMAINS = ["*"]