Skip to content

Commit

Permalink
fix: Update ALLOWED_HOSTS to allow all hosts in settings.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmedNassar7 committed Dec 25, 2024
1 parent 8439552 commit f32de80
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 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,7 +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 = config("ALLOWED_HOSTS", default="").split(",")
ALLOWED_HOSTS = ['*']
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 f32de80

Please sign in to comment.