Add SSL-redirect middleware to better support all-SSL sites
|Reported by:||Carl Meyer||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Since you pretty much shouldn't do anything with sessions or logins on a public site without SSL, I think a solid majority of public Django sites probably ought to be all-SSL. Given this, I think Django core should provide good support for all-SSL sites out of the box.
One piece of an all-SSL site is redirecting non-SSL requests to SSL. Often this will be done via a front-end proxy server, but a Django middleware to do it is quite simple, and I don't see much reason not to include one.
There's an existing implementation in django-secure.