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.