Opened 5 years ago

Closed 5 years ago

#17188 closed New feature (needsinfo)

Add use_ssl parameter to HttpResponseRedirect shortcut

Reported by: briancray Owned by: nobody
Component: HTTP handling Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Add use_ssl as a param to HttpResponseRedirect, such as:

return HttpResponseRedirect('/foo', True)

I know there are middleware options, but they involve a double redirect. This is a HUGE issue for me and I would assume others.

Change History (2)

comment:1 Changed 5 years ago by Dan Poirier

Summary: Addition to HttpResponseRedirect shortcutAdd use_ssl parameter to HttpResponseRedirect shortcut

comment:2 Changed 5 years ago by Dan Poirier

Resolution: needsinfo
Status: newclosed

Why does middleware require a double redirect? Couldn't middleware force the 'https:" on the location header in the response? I think django-secure will do this for you. There's also another ticket, 17102, to add this feature to Django itself.

Note: See TracTickets for help on using tickets.
Back to Top