mirror of
https://github.com/django/django.git
synced 2025-06-05 11:39:13 +00:00
Fixed #24460 -- Extended HttpRequest.build_absolute_uri documentation
Added explanation on why build_absolute_uri always enforces the request's scheme.
This commit is contained in:
parent
336512fae7
commit
794c3f74c3
@ -249,6 +249,14 @@ Methods
|
|||||||
|
|
||||||
Example: ``"http://example.com/music/bands/the_beatles/?print=true"``
|
Example: ``"http://example.com/music/bands/the_beatles/?print=true"``
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
Mixing HTTP and HTTPS on the same site is discouraged, therefore
|
||||||
|
:meth:`~HttpRequest.build_absolute_uri()` will always generate an
|
||||||
|
absolute URI with the same scheme the current request has. If you need
|
||||||
|
to redirect users to HTTPS, it's best to let your webserver redirect
|
||||||
|
all HTTP traffic to HTTPS.
|
||||||
|
|
||||||
.. method:: HttpRequest.get_signed_cookie(key, default=RAISE_ERROR, salt='', max_age=None)
|
.. method:: HttpRequest.get_signed_cookie(key, default=RAISE_ERROR, salt='', max_age=None)
|
||||||
|
|
||||||
Returns a cookie value for a signed cookie, or raises a
|
Returns a cookie value for a signed cookie, or raises a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user