From 50b23d6b0ca1ce564903ae7bfcb58246e44ea4ec Mon Sep 17 00:00:00 2001 From: Eunsoo Shin <62971511+esinx@users.noreply.github.com> Date: Sun, 1 Sep 2024 15:34:39 +0900 Subject: [PATCH] CORS: POST to /accounts/token (#176) --- backend/Platform/settings/base.py | 2 +- backend/Platform/settings/production.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/Platform/settings/base.py b/backend/Platform/settings/base.py index 0a24e47..f93b18b 100644 --- a/backend/Platform/settings/base.py +++ b/backend/Platform/settings/base.py @@ -85,8 +85,8 @@ "django.contrib.staticfiles", "rest_framework", "rest_framework_api_key", - "oauth2_provider", "corsheaders", + "oauth2_provider", "phonenumber_field", "email_tools.apps.EmailToolsConfig", "shortener.apps.ShortenerConfig", diff --git a/backend/Platform/settings/production.py b/backend/Platform/settings/production.py index 1529636..9703404 100644 --- a/backend/Platform/settings/production.py +++ b/backend/Platform/settings/production.py @@ -40,7 +40,7 @@ # CORS settings CORS_ALLOW_ALL_ORIGINS = True CORS_ALLOW_METHODS = ["GET", "POST"] -CORS_URLS_REGEX = r"^/options/$" +CORS_URLS_REGEX = r"^(/options/)|(/accounts/token/)$" # Email client settings EMAIL_HOST = os.getenv("SMTP_HOST")