Sign Up

Sign In

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Sorry, you do not have a permission to ask a question, You must login to ask question.

Django redirecting http -> https

  • 9

I am running:

python runserver localhost:44100

And this is redirecting me to https:

» http http://localhost:44100/
HTTP/1.0 301 Moved Permanently
Content-Type: text/html; charset=utf-8
Date: Mon, 05 Mar 2018 14:09:09 GMT
Location: https://localhost:44100/
Server: WSGIServer/0.1 Python/2.7.14
X-Frame-Options: SAMEORIGIN

Why / how is this happening? What setting does control whether Django accepts http / https?


1 Answer

  1. The runserver command only handles http.

    However if you have SECURE_SSL_REDIRECT set to True then you will be redirected from http to https.

    See the Django docs on SSL/HTTPS for more information.

    • 0

Sorry, you do not have a permission to answer to this question.