From 4e8b7e6dbbf26fa32785e91783784a6160a2f4ba Mon Sep 17 00:00:00 2001 From: Quadrubo <71718414+Quadrubo@users.noreply.github.com> Date: Tue, 2 Jul 2024 14:39:14 +0200 Subject: [PATCH] fix: api requests cors (#4929) --- apiserver/plane/settings/common.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apiserver/plane/settings/common.py b/apiserver/plane/settings/common.py index 40128f9ad..937ff0c2a 100644 --- a/apiserver/plane/settings/common.py +++ b/apiserver/plane/settings/common.py @@ -16,6 +16,7 @@ from django.core.management.utils import get_random_secret_key from sentry_sdk.integrations.celery import CeleryIntegration from sentry_sdk.integrations.django import DjangoIntegration from sentry_sdk.integrations.redis import RedisIntegration +from corsheaders.defaults import default_headers BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @@ -127,6 +128,8 @@ else: CORS_ALLOW_ALL_ORIGINS = True secure_origins = False +CORS_ALLOW_HEADERS = [*default_headers, "X-API-Key"] + # Application Settings WSGI_APPLICATION = "plane.wsgi.application" ASGI_APPLICATION = "plane.asgi.application"