You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
930 B
24 lines
930 B
import os
|
|
|
|
# Constants for PyMongo
|
|
MONGODB_URL = os.getenv("MONGODB_URL", "mongodb://localhost:27017/")
|
|
MONGODB_USERNAME = os.getenv("MONGODB_USERNAME", "mongoadmin")
|
|
MONGODB_PASSWORD = os.getenv("MONGODB_PASSWORD", "secret")
|
|
MONGODB_DATABASE = os.getenv("MONGODB_DATABASE", "memorymap")
|
|
|
|
# Constants for JWT
|
|
SECRET_KEY = os.getenv("JWT_SECRET_KEY", "_2YfT44$xF.Tg_xI63UH3D7:N+>pZN2';j%>7H@?e0:Xor'pV[") # temporary of course :)
|
|
ALGORITHM = os.getenv("JWT_ALGORITHM", "HS256")
|
|
ACCESS_TOKEN_EXPIRE_MINUTES = int(os.getenv("JWT_ACCESS_TOKEN_EXPIRE_MINUTES", 30)) # TODO: check what to add here / maybe need to evaluate criticity of that?
|
|
|
|
# Constants for OAuth2
|
|
TOKEN_URL = "/api/v1/login" # Path to the auth
|
|
|
|
# Constants for images
|
|
UPLOAD_DIR = os.path.join(os.path.dirname(os.path.dirname(__file__)), "images")
|
|
MAX_IMAGE_SIZE = 8 * 1024 * 1024 # 8 Mo
|
|
ALLOWED_MIME_TYPES = [
|
|
"image/jpeg",
|
|
"image/png",
|
|
"image/heic"
|
|
] |