From 784c28c985e184f38a8daed0ad63b31838bbc85b Mon Sep 17 00:00:00 2001 From: Parsa Nazer Date: Sat, 11 Jan 2025 21:52:23 +0330 Subject: [PATCH] CORS_ALLOWED_ORIGIN_REGEXES comment for later test --- backend/core/settings.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backend/core/settings.py b/backend/core/settings.py index 276129f..9d3dc36 100644 --- a/backend/core/settings.py +++ b/backend/core/settings.py @@ -41,6 +41,15 @@ if not DEBUG: ] # CORS_ALLOWED_ORIGINS = [f"https://{API_DOMAIN}", f"http://{API_DOMAIN}", # f"http://{DOMAIN}", f"https://{DOMAIN}", ] + # import re + # CORS_ALLOWED_ORIGIN_REGEXES = [ + # re.compile(r'^https?://(?:\w+\.)?{}$'.format(re.escape(API_DOMAIN))), + # re.compile(r'^https?://(?:\w+\.)?{}$'.format(re.escape(DOMAIN))), + # re.compile(r'^https?://(?:\w+\.)?localhost:\d+$'), + # re.compile(r'^https?://(?:\w+\.)?127\.0\.0\.1:\d+$'), + # ] + + CORS_ALLOW_ALL_ORIGINS = True # database postgres DATABASES = {