Skip to content

Commit

Permalink
refactor: Restore ALLOWED_HOSTS configuration using decouple and enab…
Browse files Browse the repository at this point in the history
…le DEBUG mode
  • Loading branch information
AhmedNassar7 committed Dec 25, 2024
1 parent f32de80 commit b66986c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions egypt_metro/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'.
Expand All @@ -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"]
Expand Down

0 comments on commit b66986c

Please sign in to comment.