diff --git a/certification_system/certification_system/settings.py b/certification_system/certification_system/settings.py index 572ed0d..1157488 100644 --- a/certification_system/certification_system/settings.py +++ b/certification_system/certification_system/settings.py @@ -32,6 +32,7 @@ "django.contrib.sessions", "django.contrib.messages", "django.contrib.staticfiles", + "corsheaders", "rest_framework", "event", "category", @@ -41,6 +42,7 @@ MIDDLEWARE = [ "django.middleware.security.SecurityMiddleware", "django.contrib.sessions.middleware.SessionMiddleware", + "corsheaders.middleware.CorsMiddleware", "django.middleware.common.CommonMiddleware", "django.middleware.csrf.CsrfViewMiddleware", "django.contrib.auth.middleware.AuthenticationMiddleware", @@ -131,6 +133,7 @@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True +CORS_ORIGIN_ALLOW_ALL = True ALLOWED_HOSTS = ["*"] USE_X_FORWARDED_HOST = True