diff --git a/egypt_metro/settings.py b/egypt_metro/settings.py index 9ce4d52..551c4c6 100644 --- a/egypt_metro/settings.py +++ b/egypt_metro/settings.py @@ -17,7 +17,7 @@ from dotenv import load_dotenv # Load environment variables from .env file from datetime import timedelta # Time delta for JWT tokens from corsheaders.defaults import default_headers # Default headers for CORS -# from decouple import config # Configuration helper +from decouple import config # Configuration helper from datetime import datetime # Date and time utilities # Build paths inside the project like this: BASE_DIR / 'subdir'. @@ -31,10 +31,8 @@ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = os.getenv("SECRET_KEY") # Secret key for Django -# DEBUG = os.getenv("DEBUG", "False") == "True" # Default to False -# ALLOWED_HOSTS = config("ALLOWED_HOSTS", default="").split(",") -DEBUG = True -ALLOWED_HOSTS = ['*'] +DEBUG = os.getenv("DEBUG", "False") == "True" # Default to False +ALLOWED_HOSTS = config("ALLOWED_HOSTS", default="").split(",") BASE_URL = os.getenv("BASE_URL") # Base URL for the project JWT_SECRET = os.getenv("JWT_SECRET") # Secret key for JWT tokens CSRF_TRUSTED_ORIGINS = ["https://backend-54v5.onrender.com"]