django-cors-middleware
django-cors-middleware copied to clipboard
https support
Hi,
I am trying to run CORS requests on a mod_wsgi Django server but I keep getting CORS issues. On my regular Django server (not https, not apache2) it works properly:
HTTPS Django:
python manage.py runmodwsgi --host 0.0.0.0 --port 8001 --https-port 8000 --ssl-certificate-file ../utils/ssl_cert/local.crt --ssl-certificate-key-file ../utils/ssl_cert/local.key --processes 8 --server-name localhost --https-only --reload-on-changes
Should django-cors-middleware work properly with it or do you know if apache requires some extra configuration somehow? (tried many things already).
I also updated my Django configuration with:
CORS_ALLOW_CREDENTIALS = True
and
'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',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
*** 'corsheaders.middleware.CorsPostCsrfMiddleware',***