From acb2ce84df38fb200a72e6a3cbc10ae8f08cc322 Mon Sep 17 00:00:00 2001 From: Parsa Nazer Date: Sun, 26 Jan 2025 03:20:27 +0330 Subject: [PATCH] allowed csrf token origins --- backend/core/settings.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/core/settings.py b/backend/core/settings.py index f15282e..cafaf14 100644 --- a/backend/core/settings.py +++ b/backend/core/settings.py @@ -35,12 +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}", - # f"https://{API_DOMAIN}", - # f"http://{API_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