#24511: New feature: Make the session cookie secure if and only if
request.is_secure()
-------------------------------+--------------------
Reporter: aptiko | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
Usually I require logged on users to use {{{https}}}. In that case, I
specify {{{SESSION_COOKIE_SECURE = True}}}. This, however, makes it
impossible to use anonymous sessions over {{{http}}}.
Examples: I have used sessions to store the sort order of a table, and to
store the user's preferred language (I know language is also a browser
setting, but sometimes it's not enough). These need to be available in
anonymous sessions as well.
Sometimes what I do is run two instances of Django, with different
{{{settings.py}}}; one has {{{SESSION_COOKIE_SECURE = True}}}, the other
{{{False}}}; and I configure the web server to use the first one for
{{{https}}} and the other one for {{{http}}}. But I think this is overkill
when Django could simply look at {{{request.is_secure()}}} and decide
accordingly.
I may write a patch about that, but first I wanted to know whether I'm
understanding something wrong.
--
Ticket URL: <https://code.djangoproject.com/ticket/24511>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/049.26f268a3265a2d366a05a2dafbf2eb33%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.