CORS error when using Django Restframework

I have a React frontend hosted at https://tasks.utkarshnawalgaria.com.

My Django API backend is hosted at https://api-tasks.utkarshnawalgaria.com.

The following is the settings that I have configured to allow for CORS.

ALLOWED_HOSTS = ["api-tasks.utkarshnawalgaria.com"]
CORS_ALLOWED_ORIGIN = [
    "https://tasks.utkarshnawalgaria.com",
    "https:://api-tasks.utkarshnawalgaria.com"
]

Even after adding the above settings, I am getting CORS not allowed error in my frontend.
Are there some other values that are required ??

Also, I have tried to allow all origins, but still get CORS error.

CORS_ALLOW_ALL_ORIGINS = True

Also, when opening the admin page, there are a bunch of requests made to the backend and then those requests show the status to be 301 and the page stops loading and shows some error.

Are you using django-cors-headers along with rest-framework? From the rest-docs

I am facing the same issue , if you find any solution please share it.

If you’re using django-cors-headers and are still facing a issue, i suggest that you open another topic specifying the error that you are facing, configurations, etc.

Did anyone solve this issue, I am having trouble uploading files from a particular endpoint, My settings file is ok and followed all steps provided by django-cors-headers

Hey there, even though this topic is open, is probably already solved.
Would be great if you add a new topic mentioning your configurations and views involved.
Cheers