Opened 3 years ago

Closed 3 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 3 years ago by poirier

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Summary changed from Addition to HttpResponseRedirect shortcut to Add use_ssl parameter to HttpResponseRedirect shortcut

comment:2 Changed 3 years ago by poirier

  • Resolution set to needsinfo
  • Status changed from new to closed

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