diff --git a/ivy/config/settings.py b/ivy/config/settings.py index 5da41fe..ed7d9db 100644 --- a/ivy/config/settings.py +++ b/ivy/config/settings.py @@ -40,11 +40,13 @@ INSTALLED_APPS = [ 'rest_framework', 'rest_framework.authtoken', 'djoser', + 'corsheaders', ] 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', @@ -141,3 +143,7 @@ EMAIL_HOST = 'sandbox.smtp.mailtrap.io' EMAIL_HOST_USER = '54ff6949e39105' EMAIL_HOST_PASSWORD = 'c59d3eaa05f98d' EMAIL_PORT = '2525' + +CORS_ALLOWED_ORIGINS = [ + "http://localhost:3000", +]