From 702ff16367e43b9627aec0f103b2b3c3ba940bc5 Mon Sep 17 00:00:00 2001 From: Parsa Nazer Date: Sat, 25 Jan 2025 22:16:32 +0330 Subject: [PATCH] update domain setting --- backend/.env.local | 4 ++-- backend/core/settings.py | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/backend/.env.local b/backend/.env.local index a6d6d4c..dadcbeb 100644 --- a/backend/.env.local +++ b/backend/.env.local @@ -17,9 +17,9 @@ DEFAULT_FROM_EMAIL = '' # telegram bot toekn TELEGRAM_BOT_TOKEN = '' # domain for allowed host and allowed cors -DOMAIN = '38.60.202.91' +DOMAIN = 'heymlz.com' # domain for api (the domain that django will use) -API_DOMAIN = '38.60.202.91' +API_DOMAIN = 'api.heymlz.com' SITE_TITLE = '' SITE_HEADER = '' # jwt token configs diff --git a/backend/core/settings.py b/backend/core/settings.py index 228b1eb..65ce072 100644 --- a/backend/core/settings.py +++ b/backend/core/settings.py @@ -35,10 +35,12 @@ DEBUG = False BASE_DIR = Path(__file__).resolve().parent.parent if not DEBUG: ALLOWED_HOSTS = ['127.0.0.1', 'localhost', DOMAIN, API_DOMAIN] - CSRF_TRUSTED_ORIGINS = [ - f"https://{DOMAIN}", - f"http://{DOMAIN}", - ] + # CSRF_TRUSTED_ORIGINS = [ + # f"https://{DOMAIN}", + # f"http://{DOMAIN}", + # f"https://{API_DOMAIN}", + # f"http://{API_DOMAIN}", + # ] # CORS_ALLOWED_ORIGINS = [f"https://{API_DOMAIN}", f"http://{API_DOMAIN}", # f"http://{DOMAIN}", f"https://{DOMAIN}", ] # import re