Skip to content
This repository has been archived by the owner on Feb 15, 2021. It is now read-only.

https support #32

Open
NicolasRannou opened this issue Sep 14, 2016 · 0 comments
Open

https support #32

NicolasRannou opened this issue Sep 14, 2016 · 0 comments

Comments

@NicolasRannou
Copy link

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',***
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant