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

后端 未结 9 939
生来不讨喜
生来不讨喜 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:22

    I would recommend using the django-sslserver package.

    The current package on PyPI only supports up to Django version 1.5.5 but a patch has been committed via 5d4664c. With this fix the system runs well and is a pretty simple and straightforward solution for testing https connections.

    UPDATE: Since I posted my answer the commit above has been merged into the master branch and a new release has been pushed to PyPI. So there shouldn't be any need to specify the 5d4664c commit for that specific fix.

提交回复
热议问题