From b66986c9ee2f04608f16900d2ec0188c2e7fe082 Mon Sep 17 00:00:00 2001 From: Ahmed Nassar Date: Wed, 25 Dec 2024 06:08:41 +0200 Subject: [PATCH] refactor: Restore ALLOWED_HOSTS configuration using decouple and enable DEBUG mode --- egypt_metro/settings.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/egypt_metro/settings.py b/egypt_metro/settings.py index f3a66dc..fcc4017 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'. @@ -32,8 +32,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(",") -ALLOWED_HOSTS = ['*'] +ALLOWED_HOSTS = config("ALLOWED_HOSTS", default="").split(",") +DEBUG = True 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"]