What is the proper deployment configuration for a Django application that needs some pages served with HTTPS and others with HTTP? I want to use HTTPS for the pages that involve registration and inputting passwords. I want to use HTTP for all other pages.
Asked
Active
Viewed 4,919 times
8
-
1Try http://www.redrobotstudios.com/blog/2009/02/18/securing-django-with-ssl/. – Katriel Aug 09 '10 at 17:21
-
What katrielalex suggested. This won't tell you how to work out a mixture of HTTP and HTTPS pages but it is worth checking out. – Manoj Govindan Aug 09 '10 at 17:25
1 Answers
6
There's no single approach as far as I know. You can use a decorator secure_required
as developed in this post by Scott Barnham:
or use middleware:
If you're looking for deployment information with respect to Apache and mod_wsgi, then Graham Dumpleton provides a nice answer in this question: