File tree Expand file tree Collapse file tree 1 file changed +18
-9
lines changed Expand file tree Collapse file tree 1 file changed +18
-9
lines changed Original file line number Diff line number Diff line change 11import os
2- from dotenv import load_dotenv
3-
4- load_dotenv ()
52
63class Config :
7- SECRET_KEY = os .getenv ('SECRET_KEY' , 'your-secret-key-here' )
8- SQLALCHEMY_DATABASE_URI = os .getenv ('DATABASE_URL' , 'sqlite:///users.db' )
4+ # Core settings
5+ SECRET_KEY = os .environ .get ('SECRET_KEY' ) or 'dev-secret-key-change-this'
6+ SQLALCHEMY_DATABASE_URI = os .environ .get ('DATABASE_URL' ) or 'sqlite:///users.db'
97 SQLALCHEMY_TRACK_MODIFICATIONS = False
10- DA_SERVER = os .getenv ('DA_SERVER' )
11- DA_USERNAME = os .getenv ('DA_USERNAME' )
12- DA_PASSWORD = os .getenv ('DA_PASSWORD' )
13- DA_DOMAIN = os .getenv ('DA_DOMAIN' )
8+
9+ # Session configuration
10+ SESSION_COOKIE_HTTPONLY = True
11+ SESSION_COOKIE_SAMESITE = 'Lax'
12+ SESSION_COOKIE_SECURE = False # Set to True if using HTTPS
13+ PERMANENT_SESSION_LIFETIME = 3600 # 1 hour
14+
15+ # JSON configuration
16+ JSON_AS_ASCII = False
17+ JSONIFY_PRETTYPRINT_REGULAR = True
18+
19+ # Optional settings
20+ LOG_LEVEL = os .environ .get ('LOG_LEVEL' , 'INFO' )
21+ FLASK_ENV = os .environ .get ('FLASK_ENV' , 'production' )
22+
You can’t perform that action at this time.
0 commit comments