Hi,
I found the answer.
To get the csrf_token working properly we need to add
CSRF_TRUSTED_ORIGINS = ['https://'+ os.environ['WEBSITE_HOSTNAME']]
Hope this might be helpful to others
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm getting this error. I tried giving CSRF_TRUSTED_ORIGINS = ['https://site.azurewebsites.net/'], CORS_ALLOWED_ORIGINS = ['https://site.azurewebsites.net/']. But landed on the same issue while submitting the form. ALLOWED_HOSTS =[os.environ['WEBSITE_HOSTNAME']] if 'WEBSITE_HOSTNAME' in os.environ else []
My middleware have
"corsheaders.middleware.CorsMiddleware",
"django.middleware.common.CommonMiddleware" and 'django.middleware.csrf.CsrfViewMiddleware'
Hi,
I found the answer.
To get the csrf_token working properly we need to add
CSRF_TRUSTED_ORIGINS = ['https://'+ os.environ['WEBSITE_HOSTNAME']]
Hope this might be helpful to others