How to make django site https in windows10. I am using public IP not local host.
I tried putting the following code in settings.py got from Error "You're accessing the development server over HTTPS, but it only supports HTTP"
CORS_REPLACE_HTTPS_REFERER = False
HOST_SCHEME = "http://"
SECURE_PROXY_SSL_HEADER = None
SECURE_SSL_REDIRECT = False
SESSION_COOKIE_SECURE = False
CSRF_COOKIE_SECURE = False
SECURE_HSTS_SECONDS = None
SECURE_HSTS_INCLUDE_SUBDOMAINS = False
SECURE_FRAME_DENY = False
I get the following error
[09/Sep/2019 12:50:18] code 400, message Bad request version ('Gð\x1a\x15Ä«Öõß/\x02h|.\x9a\x11,\x93') [09/Sep/2019 12:50:18] You're accessing the development server over HTTPS, but it only supports HTTP.
I even made DEBUG = False
But no use still the same error.
Now my issue is I am lost in trying to implement SSL in django on Windows 10 OS
Django development server (run by python manage.py runserver
) cannot handle https.
Check this answer on suggestions.
One of simplest solutions from the answer is to use django-sslserver package.
Other solutions include running some kind of https proxy locally.
Or, run it not in development mode (no live reload) using wsgi server and configuring proper https on it.
you can use ngrok to proxy your local development server to a public https url.
python manage.py runserver
ngrok http 8000
. You will get a public https url that you can use to access your local server.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With