Herkese Merhabalar,

Benim bir Django rest-api projesine sahibim. Front tarafında vue js kullandım.
Vue aracılığıyla istekte bulunurken aşağıdaki hatayı alıyorum.

Console çıktısı:

Access to XMLHttpRequest at 'https://api.iyziwell.com/api/user/login/' from origin 'https://main.d398abgajqt044.amplifyapp.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request


proje/settings.py


INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'webpack_loader',
'account',
'rest_framework',
'rest_framework.authtoken',
'rest_framework_simplejwt',
'corsheaders',
]

MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddlew are',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMidd leware',
'django.contrib.messages.middleware.MessageMiddlew are',
'django.middleware.clickjacking.XFrameOptionsMiddl eware',
'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware',
]

CORS_ORIGIN_ALLOW_ALL_ORIGINS = True
CORS_ALLOW_CREDENTIALS = True
CORS_ALLOWED_ORIGINS = [ 'https://main.d398abgajqt044.amplifyapp.com', 'http://localhost:8082',
]
CORS_ALLOWED_ORIGIN_REGEXES = [ 'https://main.d398abgajqt044.amplifyapp.com', 'http://localhost:8082',
]
CORS_ALLOW_HEADERS = ( 'accept', 'accept-encoding', 'authorization', 'content-type', 'dnt', 'origin', 'user-agent', 'x-csrftoken', 'x-requested-with', )


proje/urls.py

urlpatterns = [
path('admin/', admin.site.urls),
path('', TemplateView.as_view(template_name='index.html'), name='index'),
path('api/client/',include('client.api.urls')),
path('api/user/',include('account.api.urls')),
path('api/appointment/',include('appointment.api.urls')),
path('api/user/login', TokenObtainPairView.as_view(), name='token_obtain_pair'),
path('api/user/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
path('api/password-reset/', include('django_rest_passwordreset.urls', namespace='password-reset')),

]


istek atan sayfa = https://main.d398abgajqt044.amplifyapp.com

istek alan sayfa = https://api.iyziwell.com/api/user/login/

Postman ile rahatça istek atabiliyorum lakin vue üzerinden istek atamıyorum.