How can I test https connections with Django as easily as I can non-https connections using 'runserver'?

后端 未结 9 920
生来不讨喜
生来不讨喜 2020-11-28 17:55

I have an application that uses \"secure\" cookies and want to test it\'s functionality without needing to set up a complicated SSL enabled development server. Is there any

9条回答
  •  醉梦人生
    2020-11-28 18:17

    just install

    sudo pip install django-sslserver
    

    include sslserver in installed aps

    INSTALLED_APPS = (...
    "sslserver",
    ...
    )
    

    now you can run

     python manage.py runsslserver 0.0.0.0:8888
    

提交回复
热议问题