0
0
mirror of https://github.com/django/django.git synced 2024-11-29 22:56:46 +01:00
django/docs/ref
Unai Zalakain c7634cd7fe Fixed #7603 -- Added a 'scheme' property to the HttpRequest object
`HttpRequest.scheme` is `https` if `settings.SECURE_PROXY_SSL_HEADER` is
appropriately set and falls back to `HttpRequest._get_scheme()` (a hook
for subclasses to implement) otherwise.

`WSGIRequest._get_scheme()` makes use of the `wsgi.url_scheme` WSGI
environ variable to determine the request scheme.

`HttpRequest.is_secure()` simply checks if `HttpRequest.scheme` is
`https`.

This provides a way to check the current scheme in templates, for example.
It also allows us to deal with other schemes.

Thanks nslater for the suggestion.
2013-10-15 09:04:12 -04:00
..
class-based-views
contrib
files
forms
models
templates
clickjacking.txt
databases.txt
django-admin.txt
exceptions.txt
index.txt
middleware.txt
request-response.txt Fixed #7603 -- Added a 'scheme' property to the HttpRequest object 2013-10-15 09:04:12 -04:00
settings.txt
signals.txt
template-response.txt
unicode.txt
urlresolvers.txt
urls.txt
utils.txt
validators.txt
views.txt